aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorloli10K <[email protected]>2019-01-08 19:17:46 +0100
committerBrian Behlendorf <[email protected]>2019-01-08 10:17:46 -0800
commit0f5f23869a64ec12b1744ee3df25816c712667d2 (patch)
tree7b4da23a1250d4b528152140b5b34be9aa7ffef2 /module
parentf384c045d8135adf6fa4858948cc42ddb580c652 (diff)
zfs receive and rollback can skew filesystem_count
This commit fixes a small issue which causes both zfs receive and rollback operations to incorrectly increase the "filesystem_count" property value. This change also adds a new test group "limits" to the ZFS Test Suite to exercise both filesystem_count/limit and snapshot_count/limit functionality. Reviewed by: Jerry Jelinek <[email protected]> Reviewed by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #8232
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dsl_destroy.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/module/zfs/dsl_destroy.c b/module/zfs/dsl_destroy.c
index 97d7befbd..465b3dfac 100644
--- a/module/zfs/dsl_destroy.c
+++ b/module/zfs/dsl_destroy.c
@@ -792,14 +792,8 @@ dsl_dir_destroy_sync(uint64_t ddobj, dmu_tx_t *tx)
ASSERT0(dsl_dir_phys(dd)->dd_head_dataset_obj);
- /*
- * Decrement the filesystem count for all parent filesystems.
- *
- * When we receive an incremental stream into a filesystem that already
- * exists, a temporary clone is created. We never count this temporary
- * clone, whose name begins with a '%'.
- */
- if (dd->dd_myname[0] != '%' && dd->dd_parent != NULL)
+ /* Decrement the filesystem count for all parent filesystems. */
+ if (dd->dd_parent != NULL)
dsl_fs_ss_count_adjust(dd->dd_parent, -1,
DD_FIELD_FILESYSTEM_COUNT, tx);