[PATCH 3/8] xfs: speculative delayed allocation uses rounddown_power_of_2 badly
Alex Elder
aelder at sgi.com
Wed Jan 26 15:22:41 CST 2011
On Tue, 2011-01-25 at 19:50 +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> rounddown_power_of_2() returns an undefined result when passed a
> value of zero. The specualtive delayed allocation code is doing this
> when the inode is zero length. Hence occasionally the preallocation
> is much, much larger than is necessary (e.g. 8GB for a 270 _byte_
> file). Ensure we don't even pass a zero value to this function so
> the result of preallocation is always the desired size.
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
Looks good.
Reviewed-by: Alex Elder <aelder at sgi.com>
More information about the xfs
mailing list