From: Chandan Babu R Date: Thu, 11 Jan 2024 11:58:26 +0000 (+0530) Subject: common/xfs: Add function to detect support for metadump v2 X-Git-Tag: v2024.01.14~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0d63321c77744e2bad8c98b308a81e670f35fc0;p=xfstests-dev.git common/xfs: Add function to detect support for metadump v2 This commit defines a new function to help detect support for metadump v2. Signed-off-by: Chandan Babu R Reviewed-by: "Darrick J. Wong" Signed-off-by: Zorro Lang --- diff --git a/common/xfs b/common/xfs index 91b8ac38..49c5df15 100644 --- a/common/xfs +++ b/common/xfs @@ -708,6 +708,12 @@ _xfs_mdrestore() { $XFS_MDRESTORE_PROG $options "${metadump}" "${device}" } +_scratch_metadump_v2_supported() +{ + $XFS_DB_PROG -c "help metadump" $SCRATCH_DEV | \ + grep -q "Metadump version to be used" +} + # Snapshot the metadata on the scratch device _scratch_xfs_metadump() {