]> git.proxmox.com Git - mirror_zfs.git/commit
Fix 'zfs userspace' for received datasets in encrypted root
authorloli10K <ezomori.nozomu@gmail.com>
Mon, 16 Nov 2020 17:10:29 +0000 (18:10 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 17 Nov 2020 20:19:51 +0000 (12:19 -0800)
commitf6f3089cf6455e6b23faecd8987815c6a3c4f14c
tree2225fec727d903dffc685bdd64c88e6a7341af06
parenta09aeb9fc4947a2c4a80adce3228c33793d74734
Fix 'zfs userspace' for received datasets in encrypted root

For encrypted receives, where user accounting is initially disabled on
creation, both 'zfs userspace' and 'zfs groupspace' fails with
EOPNOTSUPP: this is because dmu_objset_id_quota_upgrade_cb() forgets to
set OBJSET_FLAG_USERACCOUNTING_COMPLETE on the objset flags after a
successful dmu_objset_space_upgrade().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #9501
Closes #9596
include/sys/dmu_objset.h
module/zfs/dmu_objset.c
module/zfs/zfs_ioctl.c
tests/runfiles/common.run
tests/zfs-tests/tests/functional/userquota/Makefile.am
tests/zfs-tests/tests/functional/userquota/userspace_encrypted.ksh [new file with mode: 0755]