[PATCH V2] fix readahead calculations in xfs_dir2_leaf_getdents()

Eric Sandeen sandeen at sandeen.net
Sat Sep 26 13:03:42 CDT 2009


Christoph Hellwig wrote:
> On Fri, Sep 25, 2009 at 02:42:26PM -0500, Eric Sandeen wrote:
>> V2: use min() as suggested by Jeff, it's tidier.
> 
> I disagree with that, with the cast it looks pretty horrible.
> At least use min_t to avoid the case, but what's wrong with:
> 
>> +		/* bufsize may have just been a guess; don't go negative */
>> +		bufsize = min((bufsize - length), (size_t)0);
> 
> 		bufsize = bufsize - length > 0 ? bufsize - length : 0;

ok, that's fine too.

I'll pick one.

> Anyway, takes this as a
> 
> 
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> 
> for any variant.
> 

thanks,
-Eric




More information about the xfs mailing list