[v2,6/6] btrfs-progs: tests/fsck: Add new images for inode mode repair functionality
diff mbox series

Message ID 20190905075800.1633-7-wqu@suse.com
State New
Headers show
Series
  • btrfs-progs: check: Repair invalid inode mode in
Related show

Commit Message

Qu Wenruo Sept. 5, 2019, 7:58 a.m. UTC
Add new test image for imode repair in subvolume trees.

Also rename the existing test case 039-bad-free-space-cache-inode-mode
to 039-bad-inode-mode, since now we can fix all bad imode.

And add the beacon file for lowmem test.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 .../039-bad-inode-mode/.lowmem_repairable        |   0
 .../bad_free_space_cache_imode.raw.xz}           | Bin
 .../bad_regular_file_imode.img.xz                | Bin 0 -> 2060 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 tests/fsck-tests/039-bad-inode-mode/.lowmem_repairable
 rename tests/fsck-tests/{039-bad-free-space-cache-inode-mode/test.raw.xz => 039-bad-inode-mode/bad_free_space_cache_imode.raw.xz} (100%)
 create mode 100644 tests/fsck-tests/039-bad-inode-mode/bad_regular_file_imode.img.xz

GIT binary patch
literal 2060
zcmV+n2=n*-H+ooF000E$*0e?f03iV!0000G&sfah5B~?rT>wRyj;C3^v%$$4d1oRm
zhA1@4!K86y=JF%i%5FwXCo1%)6gh&*5vGw=-Bj#y{x65M*-1+G4!lf`bW+BqyX<nI
zX>0#KDM;y(0T@FT;0J$&unGzx5VPj~*lxWv?pH4e3>)mmv4?lb0ocO~C8+S@`kgat
z91vZ;`v*9#EUF{=4NuC!E&oT`>E^~9dAS)tCUIor_@+y!<YSP>^G{j*i;LP1iJ3HZ
zhJHIrdnKRlC=rZGe3RyEt5&kZu;FB**-BspaqNBpGT}!X^+6~Y3bJ;(UPEFMhAq+w
zlILfo586KJT53zTWcBehL$SZAS8IYWDIoueT3wZWIGy!CsO@@ag2c833P~k7qvO{O
zF{y99tegz900OE+h4%!{IpqjVN4nb<;*|=aFX_DOnItK<l5wBY4?Jn+rX#hq6ACV^
zzy}R5JPb>mGi}Vh1w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52YmYc*kk}~g
zKLtwh*04AM(45<!VI6K!sarjD0hoYABdHI}yj})3m1(_Yverl$<Fsw1a{)b`Dr8RK
qm|_3`0000$H3dx@SJO%W0p$;XAOHa7IhfM1#Ao{g000001X)^qgznh@

literal 0
HcmV?d00001

Comments

Nikolay Borisov Sept. 9, 2019, 3:37 p.m. UTC | #1
On 5.09.19 г. 10:58 ч., Qu Wenruo wrote:
> Add new test image for imode repair in subvolume trees.
> 
> Also rename the existing test case 039-bad-free-space-cache-inode-mode
> to 039-bad-inode-mode, since now we can fix all bad imode.
> 
> And add the beacon file for lowmem test.
> 

What kind of corruption does the image have? Ideally it should have
cases where both DIR_ITEM and DIR_INDEX is used. As well as DIR_ITEM
containing collisions.

<split>
Qu Wenruo Sept. 9, 2019, 11:22 p.m. UTC | #2
On 2019/9/9 下午11:37, Nikolay Borisov wrote:
>
>
> On 5.09.19 г. 10:58 ч., Qu Wenruo wrote:
>> Add new test image for imode repair in subvolume trees.
>>
>> Also rename the existing test case 039-bad-free-space-cache-inode-mode
>> to 039-bad-inode-mode, since now we can fix all bad imode.
>>
>> And add the beacon file for lowmem test.
>>
>
> What kind of corruption does the image have?

Just bad imode, all 0.

> Ideally it should have
> cases where both DIR_ITEM and DIR_INDEX is used. As well as DIR_ITEM
> containing collisions.

Yes, that's the best case, but in that case, we will have more failure
modes, e.g. we need to repair that missing DIR_ITEM before we use
DIR_INDEX to regenerate the filetype.

So I'm just sticking to one test image for one corruption.

Thanks,
Qu

>
> <split>
>

Patch
diff mbox series

diff --git a/tests/fsck-tests/039-bad-inode-mode/.lowmem_repairable b/tests/fsck-tests/039-bad-inode-mode/.lowmem_repairable
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/fsck-tests/039-bad-free-space-cache-inode-mode/test.raw.xz b/tests/fsck-tests/039-bad-inode-mode/bad_free_space_cache_imode.raw.xz
similarity index 100%
rename from tests/fsck-tests/039-bad-free-space-cache-inode-mode/test.raw.xz
rename to tests/fsck-tests/039-bad-inode-mode/bad_free_space_cache_imode.raw.xz
diff --git a/tests/fsck-tests/039-bad-inode-mode/bad_regular_file_imode.img.xz b/tests/fsck-tests/039-bad-inode-mode/bad_regular_file_imode.img.xz
new file mode 100644
index 0000000000000000000000000000000000000000..bbdd17de1fb9e59d26d2b0502fff326f019be011