Lines Matching +full:sync +full:- +full:1

71  * If 'sync' is false, executes a dry run and returns the error code.
74 * (meaning we are running a zfs.sync function in open-context) then we
83 dsl_syncfunc_t *syncfunc, void *arg, boolean_t sync, const char *err_dsname) in zcp_sync_task() argument
88 err = checkfunc(arg, ri->zri_tx); in zcp_sync_task()
89 if (!sync) in zcp_sync_task()
92 if (!ri->zri_sync) { in zcp_sync_task()
93 return (luaL_error(state, "running functions from the zfs.sync " in zcp_sync_task()
94 "submodule requires passing sync=TRUE to " in zcp_sync_task()
95 "lzc_channel_program() (i.e. do not specify the \"-n\" " in zcp_sync_task()
100 syncfunc(arg, ri->zri_tx); in zcp_sync_task()
133 zcp_synctask_destroy(lua_State *state, boolean_t sync, nvlist_t *err_details) in zcp_synctask_destroy() argument
137 const char *dsname = lua_tostring(state, 1); in zcp_synctask_destroy()
157 dsl_destroy_snapshot_sync, &ddsa, sync, dsname); in zcp_synctask_destroy()
163 dsl_destroy_head_sync, &ddha, sync, dsname); in zcp_synctask_destroy()
185 zcp_synctask_promote(lua_State *state, boolean_t sync, nvlist_t *err_details) in zcp_synctask_promote() argument
189 const char *dsname = lua_tostring(state, 1); in zcp_synctask_promote()
194 ddpa.cr = ri->zri_cred; in zcp_synctask_promote()
195 ddpa.proc = ri->zri_proc; in zcp_synctask_promote()
202 dsl_dataset_promote_sync, &ddpa, sync, dsname); in zcp_synctask_promote()
212 .blocks_modified = 1,
223 zcp_synctask_rollback(lua_State *state, boolean_t sync, nvlist_t *err_details) in zcp_synctask_rollback() argument
226 const char *dsname = lua_tostring(state, 1); in zcp_synctask_rollback()
233 dsl_dataset_rollback_sync, &ddra, sync, dsname); in zcp_synctask_rollback()
255 zcp_synctask_snapshot(lua_State *state, boolean_t sync, nvlist_t *err_details) in zcp_synctask_snapshot() argument
260 const char *dsname = lua_tostring(state, 1); in zcp_synctask_snapshot()
268 if (spa_version(ri->zri_pool->dp_spa) < SPA_VERSION_FAST_SNAP) { in zcp_synctask_snapshot()
278 ddsa.ddsa_cr = ri->zri_cred; in zcp_synctask_snapshot()
279 ddsa.ddsa_proc = ri->zri_proc; in zcp_synctask_snapshot()
287 dsl_dataset_snapshot_sync, &ddsa, sync, dsname); in zcp_synctask_snapshot()
296 fnvlist_add_boolean(ri->zri_new_zvols, dsname); in zcp_synctask_snapshot()
316 .blocks_modified = 1
320 zcp_synctask_rename_snapshot(lua_State *state, boolean_t sync, in zcp_synctask_rename_snapshot() argument
325 const char *fsname = lua_tostring(state, 1); in zcp_synctask_rename_snapshot()
336 dsl_dataset_rename_snapshot_sync, &ddrsa, sync, NULL); in zcp_synctask_rename_snapshot()
362 zfs_prop_t prop = zfs_name_to_prop(args->zipa_prop); in zcp_synctask_inherit_prop_check()
365 if (zfs_prop_user(args->zipa_prop)) in zcp_synctask_inherit_prop_check()
377 return (dsl_props_set_check(&args->zipa_dpsa, tx)); in zcp_synctask_inherit_prop_check()
384 dsl_props_set_arg_t *dpsa = &args->zipa_dpsa; in zcp_synctask_inherit_prop_sync()
390 zcp_synctask_inherit_prop(lua_State *state, boolean_t sync, in zcp_synctask_inherit_prop() argument
398 const char *dsname = lua_tostring(state, 1); in zcp_synctask_inherit_prop()
403 dpsa->dpsa_dsname = dsname; in zcp_synctask_inherit_prop()
404 dpsa->dpsa_source = ZPROP_SRC_INHERITED; in zcp_synctask_inherit_prop()
405 dpsa->dpsa_props = fnvlist_alloc(); in zcp_synctask_inherit_prop()
406 fnvlist_add_boolean(dpsa->dpsa_props, prop); in zcp_synctask_inherit_prop()
409 zcp_synctask_cleanup, dpsa->dpsa_props); in zcp_synctask_inherit_prop()
412 zcp_synctask_inherit_prop_sync, &zipa, sync, dsname); in zcp_synctask_inherit_prop()
415 fnvlist_free(dpsa->dpsa_props); in zcp_synctask_inherit_prop()
433 .blocks_modified = 1,
437 zcp_synctask_bookmark(lua_State *state, boolean_t sync, nvlist_t *err_details) in zcp_synctask_bookmark() argument
441 const char *source = lua_tostring(state, 1); in zcp_synctask_bookmark()
455 dsl_bookmark_create_sync, &dbca, sync, source); in zcp_synctask_bookmark()
481 zcp_synctask_set_prop(lua_State *state, boolean_t sync, nvlist_t *err_details) in zcp_synctask_set_prop() argument
487 const char *dsname = lua_tostring(state, 1); in zcp_synctask_set_prop()
497 &args, sync, dsname); in zcp_synctask_set_prop()
507 int num_ret = 1; in zcp_synctask_wrapper()
516 zcp_synctask_info_t *info = lua_touserdata(state, lua_upvalueindex(1)); in zcp_synctask_wrapper()
517 boolean_t sync = lua_toboolean(state, lua_upvalueindex(2)); in zcp_synctask_wrapper() local
520 dsl_pool_t *dp = ri->zri_pool; in zcp_synctask_wrapper()
522 /* MOS space is triple-dittoed, so we multiply by 3. */ in zcp_synctask_wrapper()
524 ((uint64_t)info->blocks_modified << DST_AVG_BLKSHIFT) * 3; in zcp_synctask_wrapper()
526 zcp_parse_args(state, info->name, info->pargs, info->kwargs); in zcp_synctask_wrapper()
529 if (info->space_check != ZFS_SPACE_CHECK_NONE) { in zcp_synctask_wrapper()
531 info->space_check); in zcp_synctask_wrapper()
532 uint64_t used = dsl_dir_phys(dp->dp_root_dir)->dd_used_bytes + in zcp_synctask_wrapper()
533 ri->zri_space_used; in zcp_synctask_wrapper()
541 err = info->func(state, sync, err_details); in zcp_synctask_wrapper()
545 ri->zri_space_used += funcspace; in zcp_synctask_wrapper()
561 zcp_load_synctask_lib(lua_State *state, boolean_t sync) in zcp_load_synctask_lib() argument
580 lua_pushboolean(state, sync); in zcp_load_synctask_lib()
582 lua_setfield(state, -2, info->name); in zcp_load_synctask_lib()
585 return (1); in zcp_load_synctask_lib()