[Top] [All Lists]

Re: [PATCH 1/6] XFS: rename xfs_get_perag

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 1/6] XFS: rename xfs_get_perag
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 22 Dec 2009 09:40:55 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1AB9A794DBDDF54A8A81BE2296F7BDFE012A68B2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1260857477-2368-2-git-send-email-david@xxxxxxxxxxxxx> <1AB9A794DBDDF54A8A81BE2296F7BDFE012A68B2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Dec 21, 2009 at 04:21:13PM -0600, Alex Elder wrote:
> Dave Chinner wrote:
> > xfs_get_perag is really getting the perag that an inode
> > belongs to based on it's inode number. Convert the use of this
> > function to just get the perag from a provided ag number.
> > Use this new function to obtain the per-ag structure when
> > traversing the per AG inode trees for sync and reclaim.
> General
> - I like that you now use balanced get/put calls in some places
>   that previously "got" the ag reference directly (i.e., open
>   coded), but then used the put interface to release it.
> - I do prefer the xfs_perag_get/put naming convention you use (FYI)
> But a real question...
> - Why is there no matching xfs_perag_put() in xfs_iflush_cluster()?
>   (It was that way before.  I only superficially read that part
>   of the code so I'm probably just missing something.)

Because this patch is only really converting existing users, not
fixing unbalance bugs in th existing get/put calls. The balancing
bugs are fixed in a later patch ("XFS: convert remaining direct
references to m_perag" IIRC). There are several other balancing bugs
fixed in that patch.


Dave Chinner

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