-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZIL claiming should not start user accounting #7163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes good sense and LGTM. Just a minor build issue remaining.
0674dbd
to
da6f40e
Compare
On the surface it looks like the |
The project quota commit broke this one :) |
b0500b0
to
ed94075
Compare
The following issue seems to have something to do with user accounting, posting here in case it's relevant:
We are failing here: 2074 /*
2075 * Useraccounting is not portable and must be done with the keys loaded.
2076 * Therefore, whenever we do any kind of receive the useraccounting
2077 * must not be present.
2078 */
2079 ASSERT0(os->os_flags & OBJSET_FLAG_USERACCOUNTING_COMPLETE);
2080 ASSERT0(os->os_flags & OBJSET_FLAG_USEROBJACCOUNTING_COMPLETE); |
@loli10K I see what the issue is and should have a fix soon. |
I just imported a dd copy from my broken pool (#6916) and it worked fine with this patch. |
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. Fixes: openzfs#6916 Signed-off-by: Tom Caputi <tcaputi@datto.com>
module/zfs/zfs_vfsops.c
Outdated
if (error) | ||
return (error); | ||
|
||
error = zfsvfs_parse_options(zm->mnt_data, &zfsvfs->z_vfs); | ||
error = zfsvfs_create(osname, vfs->vfs_readonly, &zfsvfs); | ||
if (error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error path and the next one appear to leak vfs
.
*/ | ||
if (!readonly && | ||
dmu_objset_incompatible_encryption_version(zfsvfs->z_os)) | ||
return (SET_ERROR(EROFS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, this check is no longer needed since it's now handled properly in dmu_objset_own_impl()
since we're now tell the truth about the dataset being r/w.
ed94075
to
f26b531
Compare
Codecov Report
@@ Coverage Diff @@
## master #7163 +/- ##
==========================================
+ Coverage 76.35% 76.35% +<.01%
==========================================
Files 327 327
Lines 103775 103773 -2
==========================================
+ Hits 79235 79240 +5
+ Misses 24540 24533 -7
Continue to review full report at Codecov.
|
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.
Fixes: #6916
Signed-off-by: Tom Caputi tcaputi@datto.com
Types of changes
Checklist:
Signed-off-by
.