Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   Question about end_clone_bio() (http://www.linux-archive.org/device-mapper-development/687996-question-about-end_clone_bio.html)

Dong Robin 07-27-2012 05:25 AM

Question about end_clone_bio()
 
Hi

There are codes in end_clone_bio():

static void end_clone_bio(struct bio *clone, int error)
{
....
/*
* bios are processed from the head of the list.
* So the completing bio should always be rq->bio.
* If it's not, something wrong is happening.
*/
if (tio->orig->bio != bio)
DMERR("bio completion is going in the middle of the request");
....

My question is: why the completing bio should always be rq->bio? If
the driver of a block device dispatchs all the bios belong to a
request,
how should it make sure the first completing bio is the first bio in
bio list of request ?



--
--
Best Regard
Robin Dong

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 11:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.