mbox series

[0/2] btrfs-progs: tune: fix the leftover csum change item and add a test case for it

Message ID cover.1684802060.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: tune: fix the leftover csum change item and add a test case for it | expand

Message

Qu Wenruo May 23, 2023, 12:37 a.m. UTC
David's cyclic csum change tests exposed a bug even with the latest csum
change code, that I'm a total idiot and forgot to delete the csum change
item.

This results a bug that if we have run multiple csum changes to the same
target csum type (e.g. CRC32C->SHA256->CRC32C->SHA256), the second
conversion to the same type would fail due to the left over csum change items.

This series would do the fix and add a test case to cover this bug.

Qu Wenruo (2):
  btrfs-progs: tune: delete the csum change item after converting the fs
  btrfs-progs: tests/misc: add a test case for csum change

 .../058-btrfstune-csum-change/test.sh         | 26 ++++++++++++
 tune/change-csum.c                            | 42 +++++++++++++++++--
 2 files changed, 64 insertions(+), 4 deletions(-)
 create mode 100755 tests/misc-tests/058-btrfstune-csum-change/test.sh

Comments

David Sterba May 23, 2023, 10:46 a.m. UTC | #1
On Tue, May 23, 2023 at 08:37:11AM +0800, Qu Wenruo wrote:
> David's cyclic csum change tests exposed a bug even with the latest csum
> change code, that I'm a total idiot and forgot to delete the csum change
> item.
> 
> This results a bug that if we have run multiple csum changes to the same
> target csum type (e.g. CRC32C->SHA256->CRC32C->SHA256), the second
> conversion to the same type would fail due to the left over csum change items.
> 
> This series would do the fix and add a test case to cover this bug.
> 
> Qu Wenruo (2):
>   btrfs-progs: tune: delete the csum change item after converting the fs
>   btrfs-progs: tests/misc: add a test case for csum change

Added to devel thanks, no more errors reported.
Qu Wenruo May 23, 2023, 11 a.m. UTC | #2
On 2023/5/23 18:46, David Sterba wrote:
> On Tue, May 23, 2023 at 08:37:11AM +0800, Qu Wenruo wrote:
>> David's cyclic csum change tests exposed a bug even with the latest csum
>> change code, that I'm a total idiot and forgot to delete the csum change
>> item.
>>
>> This results a bug that if we have run multiple csum changes to the same
>> target csum type (e.g. CRC32C->SHA256->CRC32C->SHA256), the second
>> conversion to the same type would fail due to the left over csum change items.
>>
>> This series would do the fix and add a test case to cover this bug.
>>
>> Qu Wenruo (2):
>>    btrfs-progs: tune: delete the csum change item after converting the fs
>>    btrfs-progs: tests/misc: add a test case for csum change
>
> Added to devel thanks, no more errors reported.

Finally I can work on the resume part (which is not much compared to the
main workflow).

Thanks,
Qu