Re: [dm-devel] Re: [RFC PATCH 2/8] rqbased-dm: add block layer hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mike,

On Fri, 22 Dec 2006 01:18:44 -0600, Mike Christie <[email protected]> wrote:
> > In addition to the suggested approach, what do you think about
> > adding a new flag to req->cmd_flags which lets the end_io() handler
> > not to return bio to upper layer?
> > It will be useful for multipathing and can be done even within
> > the current __end_that_request_first().
> > For example,
> > 
> > static int __end_that_request_first()
> > {
> > 	.....
> > 	error = 0;
> > 	if (end_io_error(uptodate))
> > 		error = !uptodate ? -EIO : uptodate;
> > 	.....
> > 	if (error && (req->cmd_flags & "NEW_FLAG"))
> > 		return 0; /* Tell the driver to call end_that_request_last() */
> > 
> > 	total_types = bio_nbytes = 0;
> > 	while ((bio = req->bio) != NULL) {
> > 		..... /* process of finishing bios */
> > 	}
> > 	.....
> > }
> > 
> 
> Who would call end_that_request_first with the new flag set? The scsi
> layer or multipath layer?

Multipath layer sets the new flag.
SCSI layer of an underlying device calls __end_that_request_first()
for a cloned request.  And original bios which were issued to a dm
device will be completed through the cloned request when no error
occurs on the clone.  When an error occurs, the completion process of
the bios are skipped.

Thanks,
Kiyoshi Ueda

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux