From: Darrick J. Wong Date: Thu, 20 Feb 2025 21:47:07 +0000 (-0800) Subject: common: pass the realtime device to xfs_db when possible X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a2e303885292b04ef6ff5f61a49b7365bc6f19e5;p=users%2Fhch%2Fxfstests-dev.git common: pass the realtime device to xfs_db when possible Teach xfstests to pass the realtime device to xfs_db when it supports that option. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Zorro Lang --- diff --git a/common/xfs b/common/xfs index c8f2ea241..547e91167 100644 --- a/common/xfs +++ b/common/xfs @@ -308,6 +308,10 @@ _scratch_xfs_db_options() SCRATCH_OPTIONS="" [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV" + if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_RTDEV" ]; then + $XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev' && \ + SCRATCH_OPTIONS="$SCRATCH_OPTIONS -R$SCRATCH_RTDEV" + fi echo $SCRATCH_OPTIONS $* $SCRATCH_DEV }