xfs
[Top] [All Lists]

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

To: aelder@xxxxxxx
Subject: Re: [PATCH v2 5/9] xfsrestore: cleanup node allocation
From: Bill Kendall <wkendall@xxxxxxx>
Date: Mon, 15 Nov 2010 15:36:14 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1289853509.2199.224.camel@doink>
References: <20101105163500.747192954@xxxxxxx> <20101105163643.987306372@xxxxxxx> <1289853509.2199.224.camel@doink>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8
On 11/15/2010 02:38 PM, Alex Elder wrote:
On Fri, 2010-11-05 at 11:35 -0500, wkendall@xxxxxxx 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?

There's a wrapper function, Node_alloc, through which
all callers allocate nodes. Node_alloc initializes each
field. So this is okay.


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

I did not find them useful (though probably should have
mentioned it in the commit message.)

Bill


Otherwise looks good.

Reviewed-by: Alex Elder<aelder@xxxxxxx>

Signed-off-by: Bill Kendall<wkendall@xxxxxxx>


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