mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-07 05:11:33 +00:00
When adding the GC support I noticed we were failing fsck when we had a directory that hadn't been cleaned up yet because of rm -rf. However this isn't limited to extent-tree-v2, we'll actually fail in the same way if we were unable to do the evict portion of the deletion and left the orphan items around for everybody. This is a valid file system, it'll be cleaned up properly at mount time, so fsck shouldn't fail in this case. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
21 lines
559 B
Bash
Executable File
21 lines
559 B
Bash
Executable File
#!/bin/bash
|
|
# We could potentially have a directory and it's children with ORPHAN items left
|
|
# for them without having been cleaned up.
|
|
#
|
|
# fsck shouldn't complain about this or attempt to do anything about it, the
|
|
# orphan cleanup will do the correct thing.
|
|
#
|
|
# To create this image I simply modified the kernel to skip doing the
|
|
# btrfs_truncate_inode_items() and removing the orphan item at evict time, and
|
|
# then rm -rf'ed a directory.
|
|
|
|
source "$TEST_TOP/common"
|
|
|
|
check_prereq btrfs
|
|
|
|
check_image() {
|
|
run_check "$TOP/btrfs" check "$1"
|
|
}
|
|
|
|
check_all_images
|