Skip to contentSkip to conversation

Calling bio_endio() without completing submit_bio()

DISCUSSION Abhishek Gupta 2 participants 2 messages Mar 19, 2006 – Mar 25, 2006 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi everyone,

Does anyone know if it is possible to make a call to bio_endio() while we are still executing a submit_bio()? For example, a call to submit_bio() on a virtual device backed by the device mapper would end up in a call to the dm_request() function, which would eventually end up in a call to ti->type->map() in __map_bio() function. Is it valid to call bio_endio() from the map() function for individual target types?

Let me know if I am totally crazy.

Thanks

Abhishek Gupta
Graduate Student 2nd Year
Department of Computer Science,
UBC, Vancouver, Canada.

#1 lore raw
Quoted 6 lines · Abhishek Gupta

Does anyone know if it is possible to make a call to bio_endio() while we are still executing a submit_bio()? For example, a call to submit_bio() on a virtual device backed by the device mapper would end up in a call to the dm_request() function, which would eventually end up in a call to ti->type->map() in __map_bio() function. Is it valid to call bio_endio() from the map() function for individual target types?

Yes, this can definitely happen. For a simple example, see dm-zero.c::zero_map(). Another common example would be anyplace that needs to call bio_io_error() in the I/O-submit path, which is just a macro around bio_endio().

Hope that helps. :)

Signature · 4 lines
Kevin Corry
[email protected]
http://www.ibm.com/linux/
http://evms.sourceforge.net/