diff options
author | Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> | 2016-12-16 22:11:29 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2018-06-26 17:07:42 +0000 |
commit | d2734cce68cf740e015312314415f9034c67851c (patch) | |
tree | b7a140a3cf2a19bb7c88f2d277f3b5a33c121cea /module/zfs/zcp_synctask.c | |
parent | 88eaf610d9c7056f0946e5090cba1e6288ff2b70 (diff) | |
download | src-d2734cce68cf740e015312314415f9034c67851c.tar.gz src-d2734cce68cf740e015312314415f9034c67851c.zip |
Diffstat (limited to 'module/zfs/zcp_synctask.c')
-rw-r--r-- | module/zfs/zcp_synctask.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/module/zfs/zcp_synctask.c b/module/zfs/zcp_synctask.c index 196a3d4b754c..e089666f2018 100644 --- a/module/zfs/zcp_synctask.c +++ b/module/zfs/zcp_synctask.c @@ -110,7 +110,7 @@ static zcp_synctask_info_t zcp_synctask_destroy_info = { {.za_name = "defer", .za_lua_type = LUA_TBOOLEAN}, {NULL, 0} }, - .space_check = ZFS_SPACE_CHECK_NONE, + .space_check = ZFS_SPACE_CHECK_DESTROY, .blocks_modified = 0 }; @@ -303,10 +303,9 @@ zcp_synctask_wrapper(lua_State *state) zcp_parse_args(state, info->name, info->pargs, info->kwargs); err = 0; - if (info->space_check != ZFS_SPACE_CHECK_NONE && funcspace > 0) { - uint64_t quota = dsl_pool_adjustedsize(dp, - info->space_check == ZFS_SPACE_CHECK_RESERVED) - - metaslab_class_get_deferred(spa_normal_class(dp->dp_spa)); + if (info->space_check != ZFS_SPACE_CHECK_NONE) { + uint64_t quota = dsl_pool_unreserved_space(dp, + info->space_check); uint64_t used = dsl_dir_phys(dp->dp_root_dir)->dd_used_bytes + ri->zri_space_used; |