linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix read repair on compressed extents v3
@ 2022-07-07  5:33 Christoph Hellwig
  2022-07-07  5:33 ` [PATCH 1/6] btrfs: repair all known bad mirrors Christoph Hellwig
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Christoph Hellwig @ 2022-07-07  5:33 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba; +Cc: linux-btrfs

Hi all,

while looking into the repair code I found that read repair of compressed
extents is current fundamentally broken, in that repair tries to write
the uncompressed data into a corrupted extent during a repair.  This is
demonstrated by the "btrfs: test read repair on a corrupted compressed
extent" test submitted to xfstests.

This series fixes that, but is a bit invaside as it requires both
refactoring of the compression code and changes to the repair code to
not look up the logic address on every repair attempt.  On the plus
side it removes a whole lot of code.

The series is on top of the for-next branch, as that includes other
bio changes not in misc-next yet.

Changes since v2:
 - include the previous submitted and reviewed repair all mirrors patch
   to simplify the stack of patches
 - include an additional cleanup patch at the end
 - improve a commit log
 
Changes since v1:
 - describe the partial revert that happens in patch 1 better in the
   commit log
 - drop a now incorrect comment
 - do not add a prototype for a non-existent function

Diffstat:
 compression.c |  287 ++++++++++++++++------------------------------------------
 compression.h |   11 --
 ctree.h       |    2 
 extent_io.c   |   93 +++++++-----------
 extent_io.h   |    9 -
 inode.c       |   34 +++---
 volumes.h     |    2 
 7 files changed, 146 insertions(+), 292 deletions(-)
 compression.c |  311 ++++++++++++++++------------------------------------------
 compression.h |   11 --
 ctree.h       |    4 
 extent_io.c   |  202 ++++++++++++++++---------------------
 extent_io.h   |   10 -
 inode.c       |   39 +++----
 6 files changed, 203 insertions(+), 374 deletions(-)

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

end of thread, other threads:[~2022-08-13  5:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  5:33 fix read repair on compressed extents v3 Christoph Hellwig
2022-07-07  5:33 ` [PATCH 1/6] btrfs: repair all known bad mirrors Christoph Hellwig
2022-07-07  5:33 ` [PATCH 2/6] btrfs: simplify the pending I/O counting in struct compressed_bio Christoph Hellwig
2022-07-07  5:33 ` [PATCH 3/6] btrfs: pass a btrfs_bio to btrfs_repair_one_sector Christoph Hellwig
2022-08-12 11:21   ` Qu Wenruo
2022-08-13  5:33     ` Qu Wenruo
2022-07-07  5:33 ` [PATCH 4/6] btrfs: remove the start argument to check_data_csum Christoph Hellwig
2022-07-19 18:21   ` David Sterba
2022-07-07  5:33 ` [PATCH 5/6] btrfs: fix repair of compressed extents Christoph Hellwig
2022-07-07  5:33 ` [PATCH 6/6] btrfs: don't call btrfs_page_set_checked in finish_compressed_bio_read Christoph Hellwig
2022-07-07 13:08   ` Nikolay Borisov
2022-07-08  9:37 ` fix read repair on compressed extents v3 Nikolay Borisov
2022-07-19 18:19 ` David Sterba

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).