All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 1/2] common/xfs: support realtime devices with _scratch_xfs_admin
Date: Fri, 12 Feb 2021 21:33:24 -0800	[thread overview]
Message-ID: <161319440432.403424.15638591212385638807.stgit@magnolia> (raw)
In-Reply-To: <161319439859.403424.12347303262615931894.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

Teach _scratch_xfs_admin to support passing the realtime device to
xfs_admin so that we can actually test xfs_admin functionality with
those setups.

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


diff --git a/common/xfs b/common/xfs
index fe4dea99..7795856a 100644
--- a/common/xfs
+++ b/common/xfs
@@ -260,9 +260,15 @@ _test_xfs_db()
 _scratch_xfs_admin()
 {
 	local options=("$SCRATCH_DEV")
+	local rtopts=()
 	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
 		options+=("$SCRATCH_LOGDEV")
-	$XFS_ADMIN_PROG "$@" "${options[@]}"
+	if [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ]; then
+		$XFS_ADMIN_PROG --help 2>&1 | grep -q 'rtdev' || \
+			_notrun 'xfs_admin does not support rt devices'
+		rt_opts+=(-r "$SCRATCH_RTDEV")
+	fi
+	$XFS_ADMIN_PROG "${rt_opts[@]}" "$@" "${options[@]}"
 }
 
 _scratch_xfs_logprint()


  reply	other threads:[~2021-02-13  5:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13  5:33 [PATCHSET RFC 0/2] fstests: make sure NEEDSREPAIR feature stops mounts Darrick J. Wong
2021-02-13  5:33 ` Darrick J. Wong [this message]
2021-02-13  5:33 ` [PATCH 2/2] xfs: test that the needsrepair feature works as advertised Darrick J. Wong
2021-03-23  4:20 [PATCHSET 0/2] fstests: make sure NEEDSREPAIR feature stops mounts Darrick J. Wong
2021-03-23  4:20 ` [PATCH 1/2] common/xfs: support realtime devices with _scratch_xfs_admin Darrick J. Wong
2021-03-25 17:50   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161319440432.403424.15638591212385638807.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.