2016-10-07 07:22:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# check whether btrfsck can detect running qgroup rescan
|
|
|
|
|
2018-02-08 06:34:19 +00:00
|
|
|
source "$TEST_TOP/common"
|
2016-10-07 07:22:59 +00:00
|
|
|
|
|
|
|
check_prereq btrfs
|
|
|
|
|
|
|
|
check_image() {
|
|
|
|
local image
|
|
|
|
|
|
|
|
image=$1
|
2017-04-24 13:29:40 +00:00
|
|
|
run_check_stdout "$TOP/btrfs" check "$image" 2>&1 | \
|
2016-10-07 07:22:59 +00:00
|
|
|
grep -q "Counts for qgroup id"
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_fail "Btrfs check doesn't detect rescan correctly"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2016-11-18 18:21:02 +00:00
|
|
|
check_all_images
|