xfs
[Top] [All Lists]

Re: [PATCH] xfstests: fix internal _xfs_check to handle logdev etc

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: fix internal _xfs_check to handle logdev etc
From: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Date: Thu, 02 May 2013 12:44:18 -0500
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, "Michael L. Semon" <mlsemon35@xxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <51828F84.3040508@xxxxxxxxxxx>
Organization: IBM
References: <51827DDF.4050708@xxxxxxxxxx> <1367509132.4098.86.camel@xxxxxxxxxxxxxxxxxx> <51828F84.3040508@xxxxxxxxxxx>
Reply-to: sekharan@xxxxxxxxxx
On Thu, 2013-05-02 at 11:08 -0500, Eric Sandeen wrote:
> On 5/2/13 10:38 AM, Chandra Seetharaman wrote:
> > On Thu, 2013-05-02 at 09:53 -0500, Eric Sandeen wrote:
> >> Pull all of the old xfs_check script into common/rc:_xfs_check()
> >> so that it properly handles all options, including external log
> >> devices.
> > 
> > I see changes only related to USAGE. iiuc, log devices are handled
> > properly by current code.
> 
> also:
> 
> >> +    set -- extra $@
> >> +    shift $OPTIND
> 
> have you *tested* log devices w/ your original code?  It failed for
> Michael and for myself, so...  ;)
> 
> -Eric

yikes. sorry :(
> 
> >>
> >> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> >> ---
> >>
> >> diff --git a/common/rc b/common/rc
> >> index 19a0e18..b47a53e 100644
> >> --- a/common/rc
> >> +++ b/common/rc
> >> @@ -393,8 +393,8 @@ _xfs_check()
> >>  {
> >>      OPTS=" "
> >>      DBOPTS=" "
> >> +    USAGE="Usage: xfs_check [-fsvV] [-l logdev] [-i ino]... [-b bno]... 
> >> special"
> >>
> >> -    OPTIND=1
> >>      while getopts "b:fi:l:stvV" c
> >>      do
> >>          case $c in
> >> @@ -410,8 +410,17 @@ _xfs_check()
> >>                  ;;
> >>          esac
> >>      done
> >> -    ${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c "check$OPTS" $1
> >> -    return $?
> >> +    set -- extra $@
> >> +    shift $OPTIND
> >> +    case $# in
> >> +        1)    ${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c "check$OPTS" 
> >> $1
> >> +               status=$?
> >> +               ;;
> >> +        2)    echo $USAGE 1>&1
> >> +              status=2
> >> +              ;;
> >> +    esac
> >> +    return $status
> >>  }
> >>
> >>  _setup_large_ext4_fs()
> >>
> >>
> >>
> > 
> > 
> > _______________________________________________
> > xfs mailing list
> > xfs@xxxxxxxxxxx
> > http://oss.sgi.com/mailman/listinfo/xfs
> > 
> 


<Prev in Thread] Current Thread [Next in Thread>