Add a helper to call _supports_xfs_scrub with $SCRATCH_MNT and
$SCRATCH_DEV.
Signed-off-by: Christoph Hellwig <hch@lst.de>
return 0
}
+# Does the scratch file system support scrub?
+_scratch_require_xfs_scrub()
+{
+ _supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || \
+ _notrun "Scrub not supported"
+}
+
# Save a snapshot of a corrupt xfs filesystem for later debugging.
_xfs_metadump() {
local metadump="$1"
_dmerror_init
_dmerror_mount >> $seqres.full 2>&1
-_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"
+_scratch_require_xfs_scrub
# Write a file with 4 file blocks worth of data
victim=$SCRATCH_MNT/a
_scratch_mkfs > $tmp.mkfs
_scratch_mount
-_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"
+_scratch_require_xfs_scrub
# Force data device extents so that we can create a file with the exact bmbt
# that we need regardless of rt configuration.