btrfs: test if rename handles dir item collision correctly
authorethanwu <ethanwu@synology.com>
Tue, 15 Dec 2020 03:59:06 +0000 (11:59 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Dec 2020 16:18:43 +0000 (00:18 +0800)
commit9f0744b16961a5b7c29707a44f4d19b76dbaff27
tree33bb9c434e14b7a0adeb0590b1d9356f430d0625
parent0c5013c565b7fa9af74add55760c4986c6d1d19e
btrfs: test if rename handles dir item collision correctly

This is a regression test for the issue fixed by the kernel commit titled
"btrfs: correctly calculate item size used when item key collision happens"

In this case, we'll simply rename many forged filename that cause collision
under a directory to see if rename failed and filesystem is forced readonly.

Signed-off-by: ethanwu <ethanwu@synology.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/btrfs_crc32c_forged_name.py [new file with mode: 0755]
tests/btrfs/154 [new file with mode: 0755]
tests/btrfs/154.out [new file with mode: 0644]
tests/btrfs/group