Re: [PATCH 1/2] 286: Test FITRIM where length is smaller than FSB

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

 



On Tue, Oct 16, 2012 at 11:41:33AM +0200, Lukas Czerner wrote:
> This tests corner case in FITRIM implementation where range size is
> smaller than file system block or zero. In this case FITRIM should fail
> with EINVAL.
> 
> The problem was spotted in xfs and ext4 where in case of length = 0 the
> 'end' variable underflowed. In case of length smaller than 1 FSB FITRIM
> finished successfully, but we really should rather return EINVAL in both
> cases.
> 
> (This patch has to be applied after 'Use upstream version of fstrim
> instead of the local one')
> 
> Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>
> ---
>  286     |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  286.out |    6 ++++++

We've already got 286 (and 287), so this should probably be 288...

Otherwise, it looks good.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux