xfs
[Top] [All Lists]

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

To: Lukas Czerner <lczerner@xxxxxxxxxx>
Subject: Re: [PATCH 1/2] 286: Test FITRIM where length is smaller than FSB
From: Ben Myers <bpm@xxxxxxx>
Date: Tue, 16 Oct 2012 15:48:25 -0500
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20121016201645.GJ2739@dastard>
References: <1350380494-17482-1-git-send-email-lczerner@xxxxxxxxxx> <20121016201645.GJ2739@dastard>
User-agent: Mutt/1.5.20 (2009-06-14)
Hey Lukas,

On Wed, Oct 17, 2012 at 07:16:45AM +1100, Dave Chinner wrote:
> 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...

Unless you've got something else to fix, don't worry about reposting to update
the test number...  We sometimes have collisions and it is just easiest if we
update it at commit time.

Thanks,
        Ben

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