mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: Bartosz Fenski <bartosz@fenski.pl>, David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chris Mason <mason@kernel.org>
Subject: Re: [BUG] btrfs: degraded RAID6 preallocated writes return EIO from fdatasync
Date: Tue, 29 Sep 2026 20:11:39 +0930	[thread overview]
Message-ID: <f384b1f7-dd03-40f0-9238-95216b5fae41@suse.com> (raw)
In-Reply-To: <a72409af-45ef-45df-9970-2e38bcb22ea6@fenski.pl>



在 2026/9/29 20:04, Bartosz Fenski 写道:
> Hello,
> 
> A fresh four-device Btrfs RAID6 filesystem returns EIO from fdatasync()
> when writing to a file preallocated by fio after one device is removed.
> 
> The filesystem is clean before the device is removed, one missing device
> is within RAID6 tolerance, and all surviving-device error counters remain
> zero.
> 
> I reproduced this twice on unmodified upstream Linux v7.3-rc5. Both
> runs failed after exactly the same number of writes and at the same
> fdatasync offset. Disabling fio's preallocation makes the same workload
> complete successfully.

I'll take a look.

[...]
> A guard similar to the following before accessing csum_buf may be needed:
> 
>    if (!test_bit(rbio_sector_index(rbio, stripe_nr, sector_nr),
>                  rbio->csum_bitmap))
>            return 0;

It's already there, check verify_bio_data_sectors().

Anyway I'll try to reproduce and debug it here.

Thanks for the report,
Qu

> 
> The relevant checksum verification was introduced by commit:
> 
>    7a3150723061 ("btrfs: raid56: do data csum verification during RMW 
> cycle")
> 
> Current Btrfs for-next still appears to lack the per-sector bitmap check.
> 
> I searched the linux-btrfs archive and did not find an existing report
> with this combination of a clean filesystem, one missing RAID6 member,
> preallocated extents, and sync-time EIO.
> 
> I can test a proposed patch on the same v7.3-rc5 VM.
> 
> Regards,
> Bartosz Fenski


      reply	other threads:[~2026-09-29 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 10:34 Bartosz Fenski
2026-09-29 10:41 ` Qu Wenruo [this message]

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=f384b1f7-dd03-40f0-9238-95216b5fae41@suse.com \
    --to=wqu@suse.com \
    --cc=bartosz@fenski.pl \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@kernel.org \
    /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

all inboxes | Powered by JetHome®