mbox series

[0/2] btrfs-progs: check: Detect overlapping csum item

Message ID 20200304072701.38403-1-wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: check: Detect overlapping csum item | expand

Message

Qu Wenruo March 4, 2020, 7:26 a.m. UTC
There is one report about tree-checker rejecting overlapping csum item.

I haven't yet seen another report, thus the problem doesn't look
widespread, thus maybe some regression in older kernels.

At least let btrfs check to detect such problem.
If we had another report, I'll spending extra time for the repair
functionality (it's not that simple, as it involves a lot of csum item
operation, and unexpected overlapping range).

Qu Wenruo (2):
  btrfs-progs: check: Detect overlap csum items
  btrfs-progs: fsck-tests: Add test image for overlapping csum item

 check/main.c                                  |   9 +++++++++
 .../overlap_csum_item.img.xz                  | Bin 0 -> 2172 bytes
 .../fsck-tests/045-overlap-csum-item/test.sh  |  19 ++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 tests/fsck-tests/045-overlap-csum-item/overlap_csum_item.img.xz
 create mode 100755 tests/fsck-tests/045-overlap-csum-item/test.sh

Comments

David Sterba May 25, 2020, 1:49 p.m. UTC | #1
On Wed, Mar 04, 2020 at 03:26:59PM +0800, Qu Wenruo wrote:
> There is one report about tree-checker rejecting overlapping csum item.

Do you have link of the report?

I think the bug has been fixed by "btrfs: fix corrupt log due to
concurrent fsync of inodes with shared extents".

> I haven't yet seen another report, thus the problem doesn't look
> widespread, thus maybe some regression in older kernels.
> 
> At least let btrfs check to detect such problem.
> If we had another report, I'll spending extra time for the repair
> functionality (it's not that simple, as it involves a lot of csum item
> operation, and unexpected overlapping range).
> 
> Qu Wenruo (2):
>   btrfs-progs: check: Detect overlap csum items
>   btrfs-progs: fsck-tests: Add test image for overlapping csum item

Added to devel.