[PATCH 1/6] XFS: rename xfs_get_perag
Dave Chinner
david at fromorbit.com
Mon Dec 21 16:40:55 CST 2009
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.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list