]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu_objset.c
ZIL claiming should not start user accounting
authorTom Caputi <tcaputi@datto.com>
Wed, 21 Feb 2018 00:27:31 +0000 (19:27 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 21 Feb 2018 00:27:31 +0000 (16:27 -0800)
commit163a8c28dd7084bd85a32968c2b7941e99ead161
tree756d80c100ac910d5dd1148d5edac005035b9a74
parentcbce58135341d470c3a57e343bebe253384e1198
ZIL claiming should not start user accounting

Currently, ZIL claiming dirties objsets which causes
dsl_pool_sync() to attempt to perform user accounting on
them. This causes problems for encrypted datasets that were
raw received before the system went offline since they
cannot perform user accounting until they have their keys
loaded. This triggers an ASSERT in zio_encrypt(). Since
encryption was added, the code now depends on the fact that
data should only be written when objsets are owned. This
patch adds a check in dmu_objset_do_userquota_updates()
to ensure that useraccounting is only done when the objsets
are actually owned for write. As part of this work, the
zfsvfs and zvol code was updated so that it no longer lies
about owning objsets readonly.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #6916
Closes #7163
include/sys/zfs_vfsops.h
module/zfs/dmu_objset.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_vfsops.c
module/zfs/zvol.c