diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-12-13 11:45:20 -0800 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2022-12-17 18:38:19 +0800 |
commit | 830b45aa636f1816e161f05177a41c1ec3625665 (patch) | |
tree | 28f9149124e8ab688635cd18bd88690b0e26a2ea /common/xfs | |
parent | 538abf799424a769f2f546790b12508932838586 (diff) |
common/xfs: create a helper for restoring metadumps to the scratch devs
Refactor the open-coded $XFS_MDRESTORE_PROG calls into a proper
_scratch_xfs_mdrestore helper.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'common/xfs')
-rw-r--r-- | common/xfs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -660,6 +660,15 @@ _scratch_xfs_metadump() _xfs_metadump "$metadump" "$SCRATCH_DEV" "$logdev" nocompress "$@" } +# Restore snapshotted metadata on the scratch device +_scratch_xfs_mdrestore() +{ + local metadump=$1 + shift + + _xfs_mdrestore "$metadump" "$SCRATCH_DEV" "$@" +} + # run xfs_check and friends on a FS. _check_xfs_filesystem() { |