Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] btrfs-progs: avoid repeated data write for metadata and a small cleanup
@ 2022-08-02  7:52 Qu Wenruo
  2022-08-02  7:52 ` [PATCH v2 1/3] btrfs-progs: avoid repeated data write for metadata Qu Wenruo
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Qu Wenruo @ 2022-08-02  7:52 UTC (permalink / raw)
  To: linux-btrfs

[CHANGELOG]
v2:
- Separate the fixes from the initial patch
- Fix a bug in BUG_ON() condition which causes mkfs test failure

There is a bug report from Shinichiro that for zoned device mkfs -m DUP
(using RST) doesn't work.

It turns out to be a bug in commit 2a93728391a1 ("btrfs-progs: use
write_data_to_disk() to replace write_extent_to_disk()"), which I
wrongly assumed that write_data_to_disk() will only write the data to
one mirror.

In fact, write_data_to_disk() writes data to all mirrors, thus the
@mirror argument is completely unnecessary.

The first patch will fix the problem and cleanup the unnecessary
argument to avoid confusion.

Then the 2nd patch will fix a BUG_ON() condition.

Finally the last patch will cleanup write_and_map_eb() to completely
rely on write_data_to_disk(), without manually handling RAID56. 


Qu Wenruo (3):
  btrfs-progs: avoid repeated data write for metadata
  btrfs-progs: fix a BUG_ON() condition for write_data_to_disk()
  btrfs-progs: use write_data_to_disk() to handle RAID56 in
    write_and_map_eb()

 image/main.c              |  2 +-
 kernel-shared/disk-io.c   | 39 +++------------------------------------
 kernel-shared/extent_io.c | 12 +++++++++---
 kernel-shared/extent_io.h |  2 +-
 4 files changed, 14 insertions(+), 41 deletions(-)

-- 
2.37.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-03 19:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-02  7:52 [PATCH v2 0/3] btrfs-progs: avoid repeated data write for metadata and a small cleanup Qu Wenruo
2022-08-02  7:52 ` [PATCH v2 1/3] btrfs-progs: avoid repeated data write for metadata Qu Wenruo
2022-08-02  7:52 ` [PATCH v2 2/3] btrfs-progs: fix a BUG_ON() condition for write_data_to_disk() Qu Wenruo
2022-08-02  7:52 ` [PATCH v2 3/3] btrfs-progs: use write_data_to_disk() to handle RAID56 in write_and_map_eb() Qu Wenruo
2022-08-02  8:04 ` [PATCH v2 0/3] btrfs-progs: avoid repeated data write for metadata and a small cleanup Johannes Thumshirn
2022-08-02  8:06   ` Qu Wenruo
2022-08-02  8:34 ` Shinichiro Kawasaki
2022-08-03 19:25 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox