Message ID | 170405030390.1826350.13961921287983856419.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | [01/17] common/populate: refactor caching of metadumps to a helper | expand |
diff --git a/common/xfs b/common/xfs index 77ba786ece..4e8630b3ab 100644 --- a/common/xfs +++ b/common/xfs @@ -669,6 +669,14 @@ _xfs_metadump() { local options="$@" test -z "$options" && options="-a -o" + # Use metadump v2 format unless the user gave us a specific version + $XFS_METADUMP_PROG --help 2>&1 | grep -q -- '-v version' && \ + metadump_has_v2=1 + + if ! echo "$options" | grep -q -- '-v' && [ -n "$metadump_has_v2" ]; then + options="$options -v 2" + fi + if [ "$logdev" != "none" ]; then options="$options -l $logdev" fi