-
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
range_tree: Add zfs_recover_rt parameter and extra debug info #17094
base: master
Are you sure you want to change the base?
Conversation
ac2b7cc
to
963c816
Compare
The update includes:
|
Looks like there's a build issue:
|
Indeed, there should have been one more dev iteration on my side. It should be fixed now. |
For some reason a bunch of the runners are failing. I'm going to manually restart then. |
Please rebase on master; that will pull in the new .github/workflow/* files and allow the tests to complete. |
Thank you.
Sure, it's been moved 3 commits up, over the recent workflow changes, it should work now. |
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.
I see plenty of places where use case is not defined. We could look better. Also I think in many cases we could still log pool and vdev, even if we have no metaslab number to report.
There are production cases where unexpected range tree segment adding/removal leads to panic. The root cause investigation requires more debug info about the range tree and the segments in question when it happens. In addition, the zfs_recover_rt parameter allows converting such panics into warnings with a potential space leak as a trade-off. Signed-off-by: Igor Ostapenko <[email protected]>
It seems it's time to rename the The unknown (now generic) flag is intentionally used for the range tree instances where special treatment is not expected. Sometimes it's not about allocated/free space or it's a temporary tree which is based on already "recovered" other ones. Anyway, I think I could review the instances once again, probably someone should not be GENERIC.
Yes, it's worth the extra code to be maximum useful. It will come with the next iteration of the patch. |
* name string, which can be marked as dynamic to be freed along with the tree | ||
* instance destruction. | ||
*/ | ||
#define ZFS_RANGE_TREE_F_UC_GENERIC (1 << 0) |
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.
I don't think "GENERIC" is really meaningful. Easier and cleaner I think would be just to pass 0 if we can't say anything better (we really should).
Motivation and Context
There are production cases when loading of a metaslab leads to a ZFS panic due to unexpected entries in its spacemap (presumably). The assertions in
zfs_range_tree_add_impl()
andzfs_range_tree_remove_impl()
fail due to overlapping or missing segments, etc. A business would like to go ahead with such pools while the root cause is being investigated.Description
The idea is to allow loading such metaslabs with a potential space leak as a trade-off instead of a potential data loss.
We already have
zfs_recover
module parameter to mitigate various issues, including some range tree cases, and this patch addszfs_recover_ms
parameter to localize the recovery behavior to the metaslab loading process only.The following diagrams are expected to help with the details:
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.