]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu_objset.c
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)
committerGitHub <noreply@github.com>
Mon, 16 Nov 2020 17:10:29 +0000 (09:10 -0800)
commit4072f465bc3630bbab50afccfd6c7baf41afcc4c
tree3eabc85191eb9d0fb9dd788fe1e1305596d2a728
parent2c210f68189c6f781be050bfdc890cd6dc231fea
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]