[PATCH 3/3] btrfs-progs: fsck-tests: Add test image for invalid inode generation repair

Qu Wenruo
2019-09-24T08:11:33Z

The image contains one inode item with invalid generation.
The image can be crafted by "btrfs-corrupt-block -i 257 -f generation".
It should emulate the bad inode generation caused by older kernel around
2014.

The image is repairable for both original and lowmem mode.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
.../043-bad-inode-generation/.lowmem_repairable | 0
.../bad_inode_geneartion.img.xz | Bin 0 -> 2012 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 tests/fsck-tests/043-bad-inode-generation/.lowmem_repairable
create mode 100644 tests/fsck-tests/043-bad-inode-generation/bad_inode_geneartion.img.xz

diff --git a/tests/fsck-tests/043-bad-inode-generation/.lowmem_repairable b/tests/fsck-tests/043-bad-inode-generation/.lowmem_repairable
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/fsck-tests/043-bad-inode-generation/bad_inode_geneartion.img.xz b/tests/fsck-tests/043-bad-inode-generation/bad_inode_geneartion.img.xz
new file mode 100644
index 0000000000000000000000000000000000000000..d7302fcbabc653885ae1fac438183d7a9908a2f1
GIT binary patch
literal 2012
zcmV<22P63XH+ooF000E$*0e?f03iV!0000G&sfah3;ze3T>wRyj;C3^v%$$4d1r37
zhA1?^g@qU6X{4JoZYUD&m)J~cEzT$F8&JddXW->df79?XOzszXC^i=3jv5zdJ#gxs
z9sQ15EP30<h-K;{hVQDH?$vha-HC@MKe-p3;nw!aTGSk1iK3$jhkg^mmfi38LdMcl
zI<0I=(4xt|g|iQ|g);e0j!pQZ26;x3+R`;xzoVds&J=hBAw4B8L-P|Ve!$)LX@XLr
zpzF|j3*&CLczbqE9v1ss1PkPi%^0v(Dlm5pYr2bQv{LZKvdNN5!i)OgFjV9&wH^qU
z$RwlSTsQ2*=LfG2wb84ro>7fR>-UpptOL6$V1qyGH7H=dX29pcbb>H?Kn*GkWCd+>
z4gz!Y>ckaFgrgJeuG6M51wqhmn{kbaDVJg3Ld?lgrBdfj3zsD?P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