From: Keith Busch <kbusch@kernel.org>
To: "Tomás Trnka" <trnka@scm.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
linux-block@vger.kernel.org
Subject: Re: [REGRESSION][BISECTED] Spurious raid1 device failure triggered by qemu direct IO on 6.18+
Date: Wed, 15 Apr 2026 16:59:58 -0600 [thread overview]
Message-ID: <aeAYbuC5v4AgbakT@kbusch-mbp> (raw)
In-Reply-To: <ad-0LIubzaT8M2_O@kbusch-mbp>
On Wed, Apr 15, 2026 at 09:52:12AM -0600, Keith Busch wrote:
> Suggest the stacking layers shouldn't consider BLK_STS_INVAL to be a
> device error or retryable.
I was able to recreate the reported issue (the key is you have to use
dm-raid, not md-raid), and the below diff tests successfully for me.
I'll send a formal patch tomorrow.
> ---
> diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c
> index c33099925f230..cf1c25f290f36 100644
> --- a/drivers/md/raid1-10.c
> +++ b/drivers/md/raid1-10.c
> @@ -293,8 +293,16 @@ static inline bool raid1_should_read_first(struct mddev *mddev,
> * bio with REQ_RAHEAD or REQ_NOWAIT can fail at anytime, before such IO is
> * submitted to the underlying disks, hence don't record badblocks or retry
> * in this case.
> + *
> + * BLK_STS_INVAL means the request itself is malformed (e.g. unaligned
> + * buffers that violate DMA constraints). Retrying on another mirror will
> + * fail the same way, and counting it against the device is wrong.
> */
> static inline bool raid1_should_handle_error(struct bio *bio)
> {
> - return !(bio->bi_opf & (REQ_RAHEAD | REQ_NOWAIT));
> + if (bio->bi_opf & (REQ_RAHEAD | REQ_NOWAIT))
> + return false;
> + if (bio->bi_status == BLK_STS_INVAL)
> + return false;
> + return true;
> }
> --
>
next prev parent reply other threads:[~2026-04-15 23:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 12:18 [REGRESSION][BISECTED] Spurious raid1 device failure triggered by qemu direct IO on 6.18+ Tomáš Trnka
2026-04-15 15:20 ` Keith Busch
2026-04-15 15:52 ` Keith Busch
2026-04-15 22:59 ` Keith Busch [this message]
2026-04-16 10:13 ` Tomáš Trnka
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=aeAYbuC5v4AgbakT@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=trnka@scm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.