-
Notifications
You must be signed in to change notification settings - Fork 1.9k
zvol: check IO request type #17803
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
base: master
Are you sure you want to change the base?
zvol: check IO request type #17803
Conversation
* Align the request to volume block boundaries. This will prevent | ||
* dnode_free_range() from zeroing out the unaligned parts which is | ||
* slow (read-modify-write) and useless since we are not freeing any | ||
* space by doing so. |
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.
We might free space if compression is enabled and there are not snapshots, but I don't insist.
173e1e0
to
fad1e04
Compare
@amotin I updated the PR to check for all supported IO request types. |
@tonyhutter This is a bit neater, but it still uses |
We can do the check in two ways:
I chose 2 with the idea that it's better to use the kernel's "API" for checking the request type than looking at the raw opcodes. The problem with 2 though is that the macros are scattershot and ambiguous. For example, there's no I don't have a strong preference though. If you prefer we check the opcodes I'm fine with that.
This PR is only checking |
Use of kernel APIs is great when possible. But we have to be sure that we use only APIs of that level and never look inside later. But
Unless BIOs are limited in types (I see |
fad1e04
to
3856acf
Compare
ZVOLs don't support all block layer IO request types. Add a check for the IO types we do support. Also, remove references to io_is_secure_erase() since they are not supported on ZVOLs. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
3856acf
to
adfc733
Compare
@amotin I've reworked the code to look at the opcodes for both BIOs and requests. It feels cleaner now. Please take another look when you get a chance. |
Motivation and Context
Check the ZVOL IO request type to make sure it's supported.
Description
ZVOLs don't support all block layer IO request types. Add a check for the IO types we do support. Also, remove references to
io_is_secure_erase()
since they are not supported on ZVOLs.How Has This Been Tested?
Updated test case
Types of changes
Checklist:
Signed-off-by
.