On Thu, Jan 11, 2024 at 05:28:26PM +0530, Chandan Babu R wrote: > This commit defines a new function to help detect support for metadump v2. > > Signed-off-by: Chandan Babu R <chandanbabu@xxxxxxxxxx> Looks good, Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> --D > --- > common/xfs | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/common/xfs b/common/xfs > index 38094828..fc744489 100644 > --- a/common/xfs > +++ b/common/xfs > @@ -698,6 +698,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() > { > -- > 2.43.0 > >