common: move _scratch_metadump to common/xfs

_scratch_metadump is really an xfs-specific dump helper, so move it to
common/xfs, add 'xfs' to the name, and convert all users.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
Darrick J. Wong
2021-03-08 20:39:17 -08:00
committed by Eryu Guan
parent d4811ae1ff
commit 45b9734b98
11 changed files with 26 additions and 25 deletions
+1 -1
View File
@@ -866,7 +866,7 @@ _scratch_populate_cached() {
"xfs")
_scratch_xfs_populate $@
_scratch_xfs_populate_check
_scratch_metadump "${POPULATE_METADUMP}" -a -o
_scratch_xfs_metadump "${POPULATE_METADUMP}"
;;
"ext2"|"ext3"|"ext4")
_scratch_ext4_populate $@
-12
View File
@@ -489,18 +489,6 @@ _scratch_do_mkfs()
return $mkfs_status
}
_scratch_metadump()
{
local dumpfile=$1
shift
local options=
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
options="-l $SCRATCH_LOGDEV"
$XFS_METADUMP_PROG $options "$@" $SCRATCH_DEV $dumpfile
}
_setup_large_ext4_fs()
{
local fs_size=$1
+13
View File
@@ -453,6 +453,19 @@ _xfs_metadump() {
return $res
}
# Snapshot the metadata on the scratch device
_scratch_xfs_metadump()
{
local metadump=$1
shift
local logdev=none
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
logdev=$SCRATCH_LOGDEV
_xfs_metadump "$metadump" "$SCRATCH_DEV" "$logdev" nocompress "$@"
}
# run xfs_check and friends on a FS.
_check_xfs_filesystem()
{