public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] btrfs-progs: check: add the ability to repair extent item generation corruption
@ 2020-08-11 11:41 Qu Wenruo
  0 siblings, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2020-08-11 11:41 UTC (permalink / raw)
  To: linux-btrfs

Although we have introduced the check ability to detect bad extent item
generation, there is no repair ability.

I thought it would be rare to hit, but real world cases prove I'm a
total idiot.

So this patchset will add the ability to repair, for both lowmem mode
and original mode, along with enhanced test images.

There is also a bug fix for original mode, which fails to detect such
problem if it's a tree block.

Changelog:
v2:
- Fix a type in the subject of the 4th patch
- Fix a bracket for for a logical and and bit and
  The old code is fine and bit and has higher priority, but
  the bracket is intended to make that higher priority more obvious.

Qu Wenruo (4):
  btrfs-progs: check/lowmem: add the ability to repair extent item
    generation
  btrfs-progs: check/original: don't reset extent generation for
    check_block()
  btrfs-progs: check/original: add the ability to repair extent item
    generation
  btrfs-progs: tests/fsck: enhance invalid extent item generation test
    cases

 check/main.c                                  |  77 ++++++++++++++-
 check/mode-common.c                           |  59 ++++++++++++
 check/mode-common.h                           |   3 +
 check/mode-lowmem.c                           |  89 ++++++++++++++++--
 ...xz => bad_extent_item_gen_for_data.img.xz} | Bin
 .../bad_extent_item_gen_for_tree_block.img.xz | Bin 0 -> 1804 bytes
 .../test.sh                                   |  19 ----
 7 files changed, 216 insertions(+), 31 deletions(-)
 rename tests/fsck-tests/044-invalid-extent-item-generation/{bad_extent_item_gen.img.xz => bad_extent_item_gen_for_data.img.xz} (100%)
 create mode 100644 tests/fsck-tests/044-invalid-extent-item-generation/bad_extent_item_gen_for_tree_block.img.xz
 delete mode 100755 tests/fsck-tests/044-invalid-extent-item-generation/test.sh

-- 
2.28.0


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

* [PATCH v2 0/4] btrfs-progs: check: add the ability to repair extent item generation corruption
@ 2020-08-11 11:44 Qu Wenruo
  2020-12-01 17:45 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2020-08-11 11:44 UTC (permalink / raw)
  To: linux-btrfs

Although we have introduced the check ability to detect bad extent item
generation, there is no repair ability.

I thought it would be rare to hit, but real world cases prove I'm a
total idiot.

So this patchset will add the ability to repair, for both lowmem mode
and original mode, along with enhanced test images.

There is also a bug fix for original mode, which fails to detect such
problem if it's a tree block.

Changelog:
v2:
- Fix a type in the subject of the 4th patch
- Fix a bracket for for a logical and and bit and
  The old code is fine and bit and has higher priority, but
  the bracket is intended to make that higher priority more obvious.

Qu Wenruo (4):
  btrfs-progs: check/lowmem: add the ability to repair extent item
    generation
  btrfs-progs: check/original: don't reset extent generation for
    check_block()
  btrfs-progs: check/original: add the ability to repair extent item
    generation
  btrfs-progs: tests/fsck: enhance invalid extent item generation test
    cases

 check/main.c                                  |  77 ++++++++++++++-
 check/mode-common.c                           |  59 ++++++++++++
 check/mode-common.h                           |   3 +
 check/mode-lowmem.c                           |  89 ++++++++++++++++--
 ...xz => bad_extent_item_gen_for_data.img.xz} | Bin
 .../bad_extent_item_gen_for_tree_block.img.xz | Bin 0 -> 1804 bytes
 .../test.sh                                   |  19 ----
 7 files changed, 216 insertions(+), 31 deletions(-)
 rename tests/fsck-tests/044-invalid-extent-item-generation/{bad_extent_item_gen.img.xz => bad_extent_item_gen_for_data.img.xz} (100%)
 create mode 100644 tests/fsck-tests/044-invalid-extent-item-generation/bad_extent_item_gen_for_tree_block.img.xz
 delete mode 100755 tests/fsck-tests/044-invalid-extent-item-generation/test.sh

-- 
2.28.0


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

* Re: [PATCH v2 0/4] btrfs-progs: check: add the ability to repair extent item generation corruption
  2020-08-11 11:44 Qu Wenruo
@ 2020-12-01 17:45 ` David Sterba
  0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2020-12-01 17:45 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs

On Tue, Aug 11, 2020 at 07:44:47PM +0800, Qu Wenruo wrote:
> Although we have introduced the check ability to detect bad extent item
> generation, there is no repair ability.
> 
> I thought it would be rare to hit, but real world cases prove I'm a
> total idiot.
> 
> So this patchset will add the ability to repair, for both lowmem mode
> and original mode, along with enhanced test images.
> 
> There is also a bug fix for original mode, which fails to detect such
> problem if it's a tree block.
> 
> Changelog:
> v2:
> - Fix a type in the subject of the 4th patch
> - Fix a bracket for for a logical and and bit and
>   The old code is fine and bit and has higher priority, but
>   the bracket is intended to make that higher priority more obvious.
> 
> Qu Wenruo (4):
>   btrfs-progs: check/lowmem: add the ability to repair extent item
>     generation
>   btrfs-progs: check/original: don't reset extent generation for
>     check_block()
>   btrfs-progs: check/original: add the ability to repair extent item
>     generation
>   btrfs-progs: tests/fsck: enhance invalid extent item generation test
>     cases

Added to devel, thanks.

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

end of thread, other threads:[~2020-12-01 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-11 11:41 [PATCH v2 0/4] btrfs-progs: check: add the ability to repair extent item generation corruption Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
2020-08-11 11:44 Qu Wenruo
2020-12-01 17:45 ` David Sterba

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