if [ -f ${RESULT_DIR}/require_scratch.require_qgroup_report ]; then
$BTRFS_UTIL_PROG check $device --qgroup-report > $tmp.qgroup_report 2>&1
if grep -qE "Counts for qgroup.*are different" $tmp.qgroup_report ; then
- echo "_check_btrfs_filesystem: filesystem on $device has wrong qgroup numbers (see $seqres.full)"
- echo "_check_btrfs_filesystem: filesystem on $device has wrong qgroup numbers" \
- >> $seqres.full
+ _log_err "_check_btrfs_filesystem: filesystem on $device has wrong qgroup numbers"
echo "*** qgroup_report.$FSTYP output ***" >>$seqres.full
cat $tmp.qgroup_report >>$seqres.full
echo "*** qgroup_report.$FSTYP output ***" >>$seqres.full
$BTRFS_UTIL_PROG check $device >$tmp.fsck 2>&1
if [ $? -ne 0 ]; then
- echo "_check_btrfs_filesystem: filesystem on $device is inconsistent (see $seqres.full)"
-
- echo "_check_btrfs_filesystem: filesystem on $device is inconsistent" >>$seqres.full
+ _log_err "_check_btrfs_filesystem: filesystem on $device is inconsistent"
echo "*** fsck.$FSTYP output ***" >>$seqres.full
cat $tmp.fsck >>$seqres.full
echo "*** end fsck.$FSTYP output" >>$seqres.full
$BTRFS_UTIL_PROG qgroup show --help 2>&1 | grep -q -- --raw && echo "--raw"
}
-_require_btrfs_loadable()
+_btrfs_compression_algos()
{
- modprobe -r btrfs || _notrun "btrfs unloadable"
- modprobe btrfs || _notrun "Can't load btrfs"
-}
-
-_reload_btrfs_ko()
-{
- modprobe -r btrfs || _fail "btrfs unload failed"
- modprobe btrfs || _fail "btrfs load failed"
+ echo zlib
+ for feature in /sys/fs/btrfs/features/compress_*; do
+ echo "${feature#/sys/fs/btrfs/features/compress_}"
+ done
}