[PATCH v2 5/9] xfsrestore: cleanup node allocation

Alex Elder aelder at sgi.com
Mon Nov 15 14:38:29 CST 2010


On Fri, 2010-11-05 at 11:35 -0500, wkendall at sgi.com wrote:
> plain text document attachment (node_alloc_cleanup)
> Simplify the node allocation code. The current code takes some
> number of nodes from a new segment and links them into the
> freelist whenever the freelist is depleted. There's no reason
> to put the new nodes on the freelist, we can just allocate the
> next available new node as needed. This also saves a trip through
> win_map/win_unmap if there are no nodes on the freelist (the
> common case).

Prior to your change, a node allocated off the "virgin"
segment got zeroed before it gets returned for use. Your
change eliminates that.  Is that OK?

You also dropped a few TREE_DEBUG messages.  Were they
not useful?  (Just curious.)

Otherwise looks good.

Reviewed-by: Alex Elder <aelder at sgi.com>

> Signed-off-by: Bill Kendall <wkendall at sgi.com>





More information about the xfs mailing list