mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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 <jerry.jelinek@joyent.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #8232
This commit is contained in:
committed by
Brian Behlendorf
parent
f384c045d8
commit
0f5f23869a
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user