Linux block layer
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: "Dr. David Alan Gilbert" <linux@treblig.org>
Cc: Keith Busch <kbusch@meta.com>,
	dm-devel@lists.linux.dev, linux-block@vger.kernel.org,
	mpatocka@redhat.com, Vjaceslavs Klimovs <vklimovs@gmail.com>
Subject: Re: [PATCH 2/2] dm-raid1: don't fail the mirror for invalid I/O errors
Date: Tue, 16 Jun 2026 12:48:18 -0600	[thread overview]
Message-ID: <ajGacnaCZ6v6VE1B@kbusch-mbp> (raw)
In-Reply-To: <ajGN1OKun3qyvqMc@gallifrey>

On Tue, Jun 16, 2026 at 05:54:28PM +0000, Dr. David Alan Gilbert wrote:
> OK, for this pair I think would be fair for a Tested-by me as well;
> they certainly resolve the hang and the WARN/BUGs.
> I still see the errors as EIO on my tests, and on the older mirror type

Could you share your reproducer? I'm just using the original recipe you
sent here:

https://lore.kernel.org/linux-block/ai7rnH20IYeSmY8s@gallifrey/

And I'm seeing EINVAL instead EIO.

> get the stuck resync on write, and on the newer mirror I see the write
> apparently succeed (did it really?)

There was a time when ext4 used to fallback to buffered io for writes
but not for reads, but looks like that was fixed since 6.18, so should
be returning error.

I tried testing it with a modification to your original read test, and
it is still failing with EINVAL for me:

  pread of 4096 said: -1 (Invalid argument)
  pwrite of 4096 said: -1 (Invalid argument)

---
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>

const char* path="/mnt/tmp/testfile";
static char buf[8192];

int main()
{
  int fd=open(path, O_RDWR|O_DIRECT|O_CLOEXEC);

  errno=0;
  int res3=pread(fd, buf, 4096, 0);
  printf("pread of 4096 said: %d (%m)\n", res3);
  res3=pwrite(fd, buf, 4096, 0);
  printf("pwrite of 4096 said: %d (%m)\n", res3);
}
--

  reply	other threads:[~2026-06-16 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 15:05 [PATCH 1/2] dm-io: clone the source bio instead of copying its biovec Keith Busch
2026-06-16 15:05 ` [PATCH 2/2] dm-raid1: don't fail the mirror for invalid I/O errors Keith Busch
2026-06-16 17:54   ` Dr. David Alan Gilbert
2026-06-16 18:48     ` Keith Busch [this message]
2026-06-16 20:09       ` Dr. David Alan Gilbert
2026-06-16 15:40 ` Keith Busch
2026-06-16 15:58 ` Keith Busch

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=ajGacnaCZ6v6VE1B@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=dm-devel@lists.linux.dev \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=mpatocka@redhat.com \
    --cc=vklimovs@gmail.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