-
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
dbuf_free_range() overzealously frees dbufs #3223
Conversation
@dweeezil please review if you have a chance. Thanks |
@nedbass I'm reviewing the original issue (#2884) and am now trying to convince myself that I shouldn't have used "&&" rather than "||" to set freespill (or that it even matters). That said, your fix certainly looks correct. I think we should also change:
to
to make it clearer that we don't want to do the magnitude comparison in the freespill case. It's also more symmetric with your fix. My original version of the #2884 fix didn't use a boolean but it was added at @behlendorf's suggestion to clarify the code. The flag check was stuck on the right-hand side because that's where the older logic was. |
@nedbass along with @dweeezil's suggested improvements can you add a one line comment above those two conditionals briefly explaining them. Maybe something like this:
|
When called to free a spill block from a dnode, dbuf_free_range() has a bug that results in all dbufs for the dnode getting freed. A variety of problems may result from this bug, but a common one was a zap lookup tripping an ASSERT because the zap buffers had been zeroed out. This could happen on a dataset with xattr=sa set when extended attributes are written and removed on a directory concurrently with I/O to files in that directory. Signed-off-by: Ned Bass <bass6@llnl.gov> Fixes openzfs#3195 Fixes openzfs#3204 Fixes openzfs#3222
Updated with suggested changes. Also linked to #3204 as I think it may explain that as well. |
Regarding #3204, tracepoints data does point to a link with this bug. PID 21287 calls
|
Merged as: 58806b4 dbuf_free_range() overzealously frees dbufs |
When called to free a spill block from a dnode, dbuf_free_range() has a
bug that results in all dbufs for the dnode getting freed. A variety of
problems may result from this bug, but a common one was a zap lookup
tripping an ASSERT because the zap buffers had been zeroed out. This
could happen on a dataset with xattr=sa set when extended attributes are
written and removed on a directory concurrently with I/O to files in
that directory.
Signed-off-by: Ned Bass bass6@llnl.gov
Fixes #3195
Fixes #3222