xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix extent format buffer allocation size

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix extent format buffer allocation size
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 31 Mar 2011 02:29:20 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20110331055114.GC30279@dastard>
References: <1301453521-5614-1-git-send-email-david@xxxxxxxxxxxxx> <20110330093333.GA32582@xxxxxxxxxxxxx> <20110331055114.GC30279@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Mar 31, 2011 at 04:51:14PM +1100, Dave Chinner wrote:
> On Wed, Mar 30, 2011 at 05:33:34AM -0400, Christoph Hellwig wrote:
> > > + xfs_bmbt_rec_t          *ext_buffer;
> > > +
> > > + ext_buffer = kmem_alloc(XFS_IFORK_SIZE(ip, whichfork),
> > 
> > If the fork size be the minimum of XFS_IFORK_SIZE and the if_bytes
> > value?
> 
> I thought about that, but I don't think it makes any difference. If
> there are no delalloc extents, then XFS_IFORK_SIZE and ifp->if_bytes
> are identical when the fork is in extent format. If there are
> delalloc extents, then XFS_IFORK_SIZE() is the one we want. Hence I
> don't think we need to even consider the value of ifp->if_bytes at
> all here....

You're right.

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