Thread (4 messages) 4 messages, 2 authors, 2004-10-26

Re: [BK PATCH] 2.6.x libata bug fix

From: Jens Axboe <hidden>
Date: 2004-10-26 17:31:04

On Tue, Oct 26 2004, Jeff Garzik wrote:
When I added ioctl handling, I returned EOPNOTSUPP for the "I didn't
recognize that ioctl you wanted to execute" return code.

The block layer will execute certain ioctl operations IFF the low-level
driver returns ENOTTY, signalling to the block layer that that driver
does not support the specified ioctl.

The net effect of libata returning EOPNOTSUPP was such that it
__broke__ BLSFLSBUF ioctl, simply by implementing ->ioctl.

So, we return the proper return code, and ioctls we don't handle
start to work again.  Overall, though, this is a fragile way to do
things in the block layer, IMHO.
Well, it's pretty much the universally accepted way of signalling this
information, I'm not sure I agree. The crappy part is that EINVAL is so
wide spread as well.

And EOPNOTSUPP just shows you are a networking whore as well :-)

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help