xfs/070: add scratch log device options to direct repair invocation
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 15 Sep 2020 01:43:53 +0000 (18:43 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Sep 2020 16:52:11 +0000 (00:52 +0800)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/070

index 5d52a830b7077d756a3281b9ba8b34f2d53ddbcc..313864b7c6e2b5b7d98e29a2ea6138e3c2f1befc 100755 (executable)
@@ -41,9 +41,11 @@ _cleanup()
 _xfs_repair_noscan()
 {
        # invoke repair directly so we can kill the process if need be
+       [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+               log_repair_opts="-l $SCRATCH_LOGDEV"
        [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \
                rt_repair_opts="-r $SCRATCH_RTDEV"
-       $XFS_REPAIR_PROG $rt_repair_opts $SCRATCH_DEV 2>&1 |
+       $XFS_REPAIR_PROG $log_repair_opts $rt_repair_opts $SCRATCH_DEV 2>&1 |
                tee -a $seqres.full > $tmp.repair &
        repair_pid=$!