bio_endio error codes
Alvin Abitria
abitria.alvin at gmail.com
Mon Jun 23 13:34:38 EDT 2014
Hello Gurus,
Please disregard my earlier mail due to poor formatting
and readability.
I'm developing a block driver using the make_request
method, effectively bypassing existing scsi or request
stack in block layer. So that means im directly
working with bios. As prescribed in linux
documentation and from referring to similar
drivers in kernel, you close a session with a
bio with the bio_endio function.
I usually invoke bio_endio during successful
I/O completion, meaning with an error code
of zero. But there are cases that this is not
fulfilled or there are error cases. My question
is, what are the valid error codes that can be
used with it? My initial impression is that
other than zero as error code, bio_endio will
fail. I've read somewhere that -EBUSY is not
recognized, and I tried -EIO but my driver
crashed. I got a panic in some dio_xxx function
leading from bio_endio(bio,-EIO). I would
like to block subsequent bios sent to me after
reaching my queue depth and with no tags left,
and so I want to use bio_endio with an error
code.
What are those error codes, and will they work
for my intended function? Or is there a better
way aside from bio_endio? Thanks!
Sent from Samsung Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140624/813f1a8d/attachment.html
More information about the Kernelnewbies
mailing list