[PATCH 04/17] xfs: use metadump v2 format by default

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Create metadump v2 files by default.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 common/xfs |    8 ++++++++
 1 file changed, 8 insertions(+)


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





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux