-
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
zvol: check IO request type #17803
Conversation
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 |
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. |
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.
Looks better to me. I personally would integrate the two if
s together, having unsupported as else
, but whatever. Meanwhile just one comment below:
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 <[email protected]>
adfc733
to
5f85e46
Compare
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
.