Re: [PATCH] xfs/020: use -f option for xfs_repair a fs image

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]




----- 原始邮件 -----
> 发件人: "Eric Sandeen" <sandeen@xxxxxxxxxxx>
> 收件人: "Zorro Lang" <zlang@xxxxxxxxxx>, fstests@xxxxxxxxxxxxxxx
> 抄送: eguan@xxxxxxxxxx
> 发送时间: 星期四, 2015年 8 月 13日 上午 1:37:48
> 主题: Re: [PATCH] xfs/020: use -f option for xfs_repair a fs image
> 
> On 8/12/15 12:33 PM, Zorro Lang wrote:
> > This case creates a 60t image file on TEST_DIR. Generally
> > this's no problem. But if the image sector size is smaller
> > than the TEST_DEV sector size, for example we create the
> > image on hard 4k TEST_DEV, the test will fail.
> > 
> > So use -f for xfs_repair will helpful.
> > 
> > Signed-off-by: Zorro Lang <zlang@xxxxxxxxxx>
> > ---
> >  tests/xfs/020 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/xfs/020 b/tests/xfs/020
> > index dc305c1..120492d 100755
> > --- a/tests/xfs/020
> > +++ b/tests/xfs/020
> > @@ -55,7 +55,7 @@ fsfile=$TEST_DIR/fsfile.$seq
> >  rm -f $fsfile
> >  
> >  $MKFS_PROG -t xfs -d size=60t,file,name=$fsfile >/dev/null
> > -$XFS_REPAIR_PROG -o ag_stride=32 -t 1 $fsfile >/dev/null 2>&1
> > +$XFS_REPAIR_PROG -f -o ag_stride=32 -t 1 $fsfile >/dev/null 2>&1
> 
> Agreed, but we should audit all tests for this problem, I think.
> 
> FWIW, the latest upstream will do this automatically...
> 
> So for this change, it's fine:
> 
> Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

Thanks for review.

> 
> but will you see if other tests should be fixed as well?

I saw you fixed one in commit ddd55d5.

Sure, I will help to find all cases should be fixed.

Maybe add -f automatically for xfs_repair will be better, if it
try to repair an image file?

Or maybe add a function likes mkfs_image_file(), try to find the
sector size of the device contain the image file at first?

Thanks,
Zorro


> 
> -Eric
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux