[PATCH v3] xfs: extent size hints can round up extents past MAXEXTLEN

Dave Chinner david at fromorbit.com
Tue May 26 20:56:05 CDT 2015


On Wed, May 27, 2015 at 10:36:24AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> This results in BMBT corruption, as seen by this test:
....
> -	if ((temp = (align_alen % extsz))) {
> -		align_alen += extsz - temp;
> -	}
> +	while (align_alen > MAXEXTLEN)
> +		align_alen -= extsz;
> +	ASSERT(align_alen <= MAXEXTLEN);

FYI, this bit is the only difference in this version - it fixes the
test case that Brian pointed out that still didn't work properly.

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list