[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20061222.145532.104028283.k-ueda@ct.jp.nec.com>
Date: Fri, 22 Dec 2006 14:55:32 -0500 (EST)
From: Kiyoshi Ueda <k-ueda@...jp.nec.com>
To: Mike Christie <michaelc@...wisc.edu>
Cc: mchristi@...hat.com, linux-kernel@...r.kernel.org, agk@...hat.com,
jens.axboe@...cle.com, dm-devel@...hat.com, j-nomura@...jp.nec.com,
k-ueda@...jp.nec.com
Subject: Re: [dm-devel] Re: [RFC PATCH 2/8] rqbased-dm: add block layer hook
Hi Mike,
On Fri, 22 Dec 2006 01:18:44 -0600, Mike Christie <michaelc@...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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists