Re: [PATCH 19/20] xfs: run xfs_repair at the end of each test

Darrick J. Wong
2016-07-05T04:11:43Z

On Tue, Jul 05, 2016 at 11:56:17AM +0800, Eryu Guan wrote:
> On Thu, Jun 16, 2016 at 06:48:01PM -0700, Darrick J. Wong wrote:
> > Run xfs_repair twice at the end of each test -- once to rebuild
> > the btree indices, and again with -n to check the rebuild work.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> > common/rc | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> >
> > diff --git a/common/rc b/common/rc
> > index 1225047..847191e 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -2225,6 +2225,9 @@ _check_xfs_filesystem()
> > ok=0
> > fi
> >
> > + $XFS_REPAIR_PROG $extra_options $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
> > + cat $tmp.repair | _fix_malloc >>$seqres.full
> > +
>
> Won't this hide fs corruptions? Did I miss anything?

I could've sworn it did:

xfs_repair -n
(complain if corrupt)

xfs_repair

xfs_repair -n
(complain if still corrupt)

But that first xfs_repair -n hunk disappeared. :(

Ok, will fix and resend.

--D

>
> Thanks,
> Eryu
>
> > $XFS_REPAIR_PROG -n $extra_options $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
> > if [ $? -ne 0 ]
> > then
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe fstests" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html