]> git.proxmox.com Git - mirror_zfs.git/commit
Always track temporary fses and snapshots for accounting
authorPaul Dagnelie <paulcd2000@gmail.com>
Thu, 27 Aug 2020 04:38:27 +0000 (21:38 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 27 Aug 2020 23:06:47 +0000 (16:06 -0700)
commit79d6a1b1dab474733f3879de0f0fbfe30e4de436
treeac720aeb4f9a6eb598a330f8f8aab1431a870eff
parent510179f08637a3fd85f4b5312b81eb9c7e040773
Always track temporary fses and snapshots for accounting

The root cause of the issue is that we only occasionally do as the
comments in the code suggest and actually ignore the %recv dataset when
it comes to filesystem limit tracking. Specifically, the only time we
ignore it is when initializing the filesystem and snapshot limit values;
when creating a new %recv dataset or deleting one, we always update
the bookkeeping. This causes a problem if you init the fs count on a
filesystem that already has a %recv dataset, since the bookmarking
will be decremented but not incremented. This is resolved in this
patch by simply always tracking the %recv dataset as a child.

Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #10791
module/zfs/dsl_dir.c
tests/runfiles/common.run
tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh [new file with mode: 0755]