]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common/xfs: Add function to detect support for metadump v2
authorChandan Babu R <chandanbabu@kernel.org>
Thu, 11 Jan 2024 11:58:26 +0000 (17:28 +0530)
committerZorro Lang <zlang@kernel.org>
Sun, 14 Jan 2024 12:39:09 +0000 (20:39 +0800)
This commit defines a new function to help detect support for metadump v2.

Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/xfs

index 91b8ac387c69649072ecf7d3dc54486feccaba2f..49c5df157e5acbb04e6094834eeca07a1e478a47 100644 (file)
@@ -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()
 {