xfs
[Top] [All Lists]

Re: [PATCH 21/28] xfs: cleanup struct xfs_dir2_leaf

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 21/28] xfs: cleanup struct xfs_dir2_leaf
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 8 Jul 2011 20:21:22 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110707110644.667342204@xxxxxxxxxxxxxxxxxxxxxx>
References: <20110707110535.205001532@xxxxxxxxxxxxxxxxxxxxxx> <20110707110644.667342204@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Thu, Jul 07, 2011 at 07:05:56AM -0400, Christoph Hellwig wrote:
> Simplify the confusing xfs_dir2_leaf structure.  It is supposed to describe
> an XFS dir2 leaf format btree block, but due to the variable sized nature
> of almost all elements in it it can't actuall do anything close to that
> job.   Remove the members that are after the first variable sized array,
> given that they could only be used for sizeof expressions that can as well
> just use the underlying types directly, and make the ents array a real
> C99 variable sized array.
> 
> Also factor out the xfs_dir2_leaf_size, to make the sizing of a leaf
> entry which already was convoluted somewhat readable after using the
> longer type names in the sizeof expressions.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Alex Elder <aelder@xxxxxxx>

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

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