Skip to content

Commit a92826e

Browse files
committed
btrfs-progs: fsck-tests: a new test case for missing root orphan item
The new image is created by: - Make btrfs_delete_subvolume() to commit transaction So that we're sure the orphan item is committed to disk after removing the subvolume. - Remove the orphan item from tree root Then use this image to make sure btrfs check can detect such problem. Repair is not yet supported. Reviewed-by: Boris Burkov <[email protected]> Signed-off-by: Qu Wenruo <[email protected]>
1 parent 570c80c commit a92826e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
#
3+
# Verify that check can report missing orphan root itemm as an error
4+
5+
source "$TEST_TOP/common" || exit
6+
7+
check_prereq btrfs
8+
9+
check_image() {
10+
run_mustfail "missing root orphan item not reported as an error" \
11+
"$TOP/btrfs" check "$1"
12+
}
13+
14+
check_all_images

0 commit comments

Comments
 (0)