From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p0QLKKT9165808 for ; Wed, 26 Jan 2011 15:20:20 -0600 Subject: Re: [PATCH 3/8] xfs: speculative delayed allocation uses rounddown_power_of_2 badly From: Alex Elder In-Reply-To: <1295945444-29488-4-git-send-email-david@fromorbit.com> References: <1295945444-29488-1-git-send-email-david@fromorbit.com> <1295945444-29488-4-git-send-email-david@fromorbit.com> Date: Wed, 26 Jan 2011 15:22:41 -0600 Message-ID: <1296076961.1980.940.camel@doink> Mime-Version: 1.0 Reply-To: aelder@sgi.com List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: xfs@oss.sgi.com On Tue, 2011-01-25 at 19:50 +1100, Dave Chinner wrote: > From: Dave Chinner > > 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 > Reviewed-by: Christoph Hellwig Looks good. Reviewed-by: Alex Elder _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs