From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs <linux-xfs@vger.kernel.org>,
dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>
Subject: Re: [dm-devel] error propagation problem on xfs over dm stripe
Date: Tue, 31 Jan 2017 23:42:49 -0800 [thread overview]
Message-ID: <20170201074249.GA22669@infradead.org> (raw)
In-Reply-To: <b44b5dc2-eac0-cd40-6de8-b615cb4dece8@sandeen.net>
On Tue, Jan 31, 2017 at 09:12:07PM -0600, Eric Sandeen wrote:
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index 3086da5..3555ba8 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -808,7 +808,9 @@ static void dec_pending(struct dm_io *io, int error)
> } else {
> /* done with normal IO or empty flush */
> trace_block_bio_complete(md->queue, bio, io_error);
> - bio->bi_error = io_error;
> + /* don't overwrite or clear existing errors */
> + if (!bio->bi_error)
> + bio->bi_error = io_error;
> bio_endio(bio);
> }
> }
>
> but Mike was a little uneasy, not knowing for sure how we got here to
> overwrite this bio's error (hopefully I'm representing his concerns
> fairly and correctly).
FYI, what we do both in the XFS buffer cache and the new direct I/O
code is to use a
cmpxchg(&dio->error, 0, ret);
in a similar situation, which should work here, too.
next prev parent reply other threads:[~2017-02-01 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 3:12 error propagation problem on xfs over dm stripe Eric Sandeen
2017-02-01 7:42 ` Christoph Hellwig [this message]
2017-02-01 14:33 ` Mike Snitzer
2017-02-01 14:49 ` Christoph Hellwig
2017-02-01 10:28 ` [dm-devel] " Junichi Nomura
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=20170201074249.GA22669@infradead.org \
--to=hch@infradead.org \
--cc=dm-devel@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
--cc=snitzer@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;
as well as URLs for NNTP newsgroup(s).