public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Wareing <rwareing@fb.com>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, darrick.wong@oracle.com
Subject: [PATCH v2 3/3] xfs/realtime: Fix direct invocations of xfs_repair
Date: Mon, 25 Sep 2017 12:56:25 -0700	[thread overview]
Message-ID: <20170925195625.756877-3-rwareing@fb.com> (raw)
In-Reply-To: <20170925195625.756877-1-rwareing@fb.com>

Fixes direct invocations of xfs_repair to add in -r option if required.

Signed-off-by: Richard Wareing <rwareing@fb.com>
---
Changes since v1:
* Fixed kill -9 in test xfs/070

 tests/xfs/070 | 3 ++-
 tests/xfs/291 | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/xfs/070 b/tests/xfs/070
index 0ae6eff..a06e998 100755
--- a/tests/xfs/070
+++ b/tests/xfs/070
@@ -56,7 +56,8 @@ _cleanup()
 _xfs_repair_noscan()
 {
 	# invoke repair directly so we can kill the process if need be
-	$XFS_REPAIR_PROG $SCRATCH_DEV 2>&1 | tee -a $seqres.full > $tmp.repair &
+	[ -n "$SCRATCH_RTDEV" ] && rt_repair_opts="-r $SCRATCH_RTDEV"
+	$XFS_REPAIR_PROG $rt_repair_opts $SCRATCH_DEV 2>&1 | tee -a $seqres.full > $tmp.repair &
 	repair_pid=$!
 
 	# monitor progress for as long as it is running
diff --git a/tests/xfs/291 b/tests/xfs/291
index 3f5295c..140fa33 100755
--- a/tests/xfs/291
+++ b/tests/xfs/291
@@ -122,7 +122,8 @@ _xfs_check $SCRATCH_DEV >> $seqres.full 2>&1 || _fail "xfs_check failed"
 # Can xfs_metadump cope with this monster?
 _scratch_metadump $tmp.metadump || _fail "xfs_metadump failed"
 xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed"
-xfs_repair -f $tmp.img >> $seqres.full 2>&1 || _fail "xfs_repair of metadump failed"
+[ -n "$SCRATCH_RTDEV" ] && rt_repair_opts="-r $SCRATCH_RTDEV"
+xfs_repair $rt_repair_opts -f $tmp.img >> $seqres.full 2>&1 || _fail "xfs_repair of metadump failed"
 
 # Yes it can; success, all done
 status=0
-- 
2.9.5


  parent reply	other threads:[~2017-09-25 19:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 19:56 [PATCH v2 1/3] xfs/realtime: Add require_no_realtime function Richard Wareing
2017-09-25 19:56 ` [PATCH v2 2/3] xfs/realtime: Default rtinherit=1, add _require_no_rtinherit function Richard Wareing
2017-09-25 21:33   ` Darrick J. Wong
2017-09-26  1:54     ` Richard Wareing
2017-09-26 10:50   ` Eryu Guan
2017-09-25 19:56 ` Richard Wareing [this message]
2017-09-25 21:34   ` [PATCH v2 3/3] xfs/realtime: Fix direct invocations of xfs_repair Darrick J. Wong
2017-09-26 11:02   ` Eryu Guan
2017-09-25 21:38 ` [PATCH v2 1/3] xfs/realtime: Add require_no_realtime function Darrick J. Wong
2017-09-26  2:25   ` Richard Wareing
2017-09-26 10:01     ` Eryu Guan

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=20170925195625.756877-3-rwareing@fb.com \
    --to=rwareing@fb.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox