xfs
[Top] [All Lists]

Re: [PATCH 3/8] xfs: speculative delayed allocation uses rounddown_power

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/8] xfs: speculative delayed allocation uses rounddown_power_of_2 badly
From: Alex Elder <aelder@xxxxxxx>
Date: Wed, 26 Jan 2011 15:22:41 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1295945444-29488-4-git-send-email-david@xxxxxxxxxxxxx>
References: <1295945444-29488-1-git-send-email-david@xxxxxxxxxxxxx> <1295945444-29488-4-git-send-email-david@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Tue, 2011-01-25 at 19:50 +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>



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