lkml.org 
[lkml]   [2006]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [dm-devel] Re: [RFC PATCH 2/8] rqbased-dm: add block layer hook
From
Hi Mike,

On Fri, 22 Dec 2006 01:18:44 -0600, Mike Christie <michaelc@cs.wisc.edu> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-22 20:49    [W:0.056 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site