From: Mike Christie <mikenc@us.ibm.com>
To: Joe Thornber <thornber@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Patch 1/6] dm: endio method
Date: Sat, 21 Feb 2004 01:58:38 -0800 [thread overview]
Message-ID: <40372BCE.7090708@us.ibm.com> (raw)
In-Reply-To: <20040220153403.GO27549@reti>
Joe Thornber wrote:
> Add an endio method to targets. This method is allowed to request
> another shot at failed ios (think multipath).
> + if (endio) {
> + /* Restore bio fields. */
> + bio->bi_sector = tio->bi_sector;
> + bio->bi_bdev = tio->bi_bdev;
> + bio->bi_size = tio->bi_size;
> + bio->bi_idx = tio->bi_idx;
> +
> + r = endio(tio->ti, bio, error, &tio->info);
> + r = ti->type->map(ti, clone, &tio->info);
> + if (r > 0) {
> + /* Save the bio info so we can restore it during endio. */
> + tio->bi_sector = clone->bi_sector;
> + tio->bi_bdev = clone->bi_bdev;
> + tio->bi_size = clone->bi_size;
> + tio->bi_idx = clone->bi_idx;
Saving and restoring bi_bdev is going to break multipath. When a bio is
remapped and resent multiple times by the target becuase of multiple
path failures, restoring bi_bdev to the original value will cause only
that path to be marked as failed instead of the paths that the bio was
remapped to.
This is DM's cloned bio. Is there a guarantee that this value should be
safe from lower level drivers overwriting it, or is it similar to b_rdev
for buffer_heads?
Mike Christie
next prev parent reply other threads:[~2004-02-21 10:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-20 15:31 device-mapper patchset Joe Thornber
2004-02-20 15:34 ` [Patch 1/6] dm: endio method Joe Thornber
2004-02-21 9:58 ` Mike Christie [this message]
2004-02-21 10:44 ` Christophe Saout
2004-02-23 10:05 ` Joe Thornber
2004-02-23 22:08 ` Mike Christie
2004-02-23 22:29 ` Joe Thornber
2004-02-24 2:18 ` Mike Christie
2004-02-20 15:34 ` [Patch 2/6] dm: remove v1 ioctl interface Joe Thornber
2004-02-20 20:18 ` Andreas Jellinghaus
2004-02-21 6:15 ` Andrew Morton
2004-02-20 15:35 ` [Patch 3/6] dm: list_for_each_entry audit Joe Thornber
2004-02-20 15:36 ` [Patch 4/6] dm: default queue limits Joe Thornber
2004-02-20 15:39 ` Joe Thornber
2004-02-20 15:37 ` [Patch 5/6] dm: list targets cmd Joe Thornber
2004-02-21 6:17 ` Andrew Morton
2004-02-20 15:37 ` [Patch 6/6] dm: multipath target Joe Thornber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40372BCE.7090708@us.ibm.com \
--to=mikenc@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thornber@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox