xfs: introduce a per-ag inode iterator
authorDave Chinner <david@fromorbit.com>
Mon, 8 Jun 2009 13:35:14 +0000 (15:35 +0200)
committerChristoph Hellwig <hch@brick.lst.de>
Mon, 8 Jun 2009 13:35:14 +0000 (15:35 +0200)
commit75f3cb1393133682958db6f157e1b6473e5a366b
treee2e22c20c20e7d37e64b8f7fa4148253be01364a
parentabc1064742604e60a47a65fa3214dc1a84db093d
xfs: introduce a per-ag inode iterator

Given that we walk across the per-ag inode lists so often, it makes sense to
introduce an iterator for this.

Convert the sync and reclaim code to use this new iterator, quota code will
follow in the next patch.

Also change xfs_reclaim_inode to return -EGAIN instead of 1 for an inode
already under reclaim.  This simplifies the AG iterator and doesn't
matter for the only other caller.

[hch: merged the lookup and execute callbacks back into one to get the
 pag_ici_lock locking correct and simplify the code flow]

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/xfs_ag.h