mbox series

[0/2] btrfs-progs: convert: fix csum generation for migrated ranges

Message ID cover.1683592875.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: convert: fix csum generation for migrated ranges | expand

Message

Qu Wenruo May 9, 2023, 12:43 a.m. UTC
There is an internal report that btrfs/012 failed on 64K page size
systems.

It turns out that with 64K block size for ext4, even an empty ext4 can
lead to csum errors for the image file.

The root cause is the bad csum generation, which read incorrect data
from the disk, and leads to bad csum generated. (while the on-disk data
is still correct).

This patchset would fix the bug and add a test case for it.

Qu Wenruo (2):
  btrfs-progs: convert: fix bad csum for migrated range.
  btrfs-progs: tests/convert: add a test case to check the csum for the
    image file

 convert/main.c                                   | 12 ++++++++++--
 .../023-64k-blocksize-migrated/test.sh           | 16 ++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100755 tests/convert-tests/023-64k-blocksize-migrated/test.sh

Comments

David Sterba May 10, 2023, 4:42 p.m. UTC | #1
On Tue, May 09, 2023 at 08:43:13AM +0800, Qu Wenruo wrote:
> There is an internal report that btrfs/012 failed on 64K page size
> systems.
> 
> It turns out that with 64K block size for ext4, even an empty ext4 can
> lead to csum errors for the image file.
> 
> The root cause is the bad csum generation, which read incorrect data
> from the disk, and leads to bad csum generated. (while the on-disk data
> is still correct).
> 
> This patchset would fix the bug and add a test case for it.
> 
> Qu Wenruo (2):
>   btrfs-progs: convert: fix bad csum for migrated range.
>   btrfs-progs: tests/convert: add a test case to check the csum for the
>     image file

Added to devel, thanks.