diff mbox series

[18/24] xfs/291: fix open-coded repair call to mdrestore'd fs image

Message ID 160013429012.2923511.7187414322832672163.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: tons of random fixes | expand

Commit Message

Darrick J. Wong Sept. 15, 2020, 1:44 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Attach any external log devices to the open-coded repair call.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/291 |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Zorro Lang Sept. 16, 2020, 11:41 a.m. UTC | #1
On Mon, Sep 14, 2020 at 06:44:50PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Attach any external log devices to the open-coded repair call.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Good to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/xfs/291 |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/tests/xfs/291 b/tests/xfs/291
> index adef2536..5d4f1ac4 100755
> --- a/tests/xfs/291
> +++ b/tests/xfs/291
> @@ -110,7 +110,9 @@ _scratch_metadump $tmp.metadump || _fail "xfs_metadump failed"
>  xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed"
>  [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \
>  	rt_repair_opts="-r $SCRATCH_RTDEV"
> -$XFS_REPAIR_PROG $rt_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \
> +[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_LOGDEV" ] && \
> +	log_repair_opts="-l $SCRATCH_LOGDEV"
> +$XFS_REPAIR_PROG $rt_repair_opts $log_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \
>  	_fail "xfs_repair of metadump failed"
>  
>  # Yes it can; success, all done
>
diff mbox series

Patch

diff --git a/tests/xfs/291 b/tests/xfs/291
index adef2536..5d4f1ac4 100755
--- a/tests/xfs/291
+++ b/tests/xfs/291
@@ -110,7 +110,9 @@  _scratch_metadump $tmp.metadump || _fail "xfs_metadump failed"
 xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed"
 [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \
 	rt_repair_opts="-r $SCRATCH_RTDEV"
-$XFS_REPAIR_PROG $rt_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \
+[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_LOGDEV" ] && \
+	log_repair_opts="-l $SCRATCH_LOGDEV"
+$XFS_REPAIR_PROG $rt_repair_opts $log_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \
 	_fail "xfs_repair of metadump failed"
 
 # Yes it can; success, all done