]> git.openfabrics.org - ~emulex/infiniband.git/commit
xfs: make AIL tail pushing independent of the grant lock
authorDave Chinner <dchinner@redhat.com>
Tue, 21 Dec 2010 01:09:20 +0000 (12:09 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 21 Dec 2010 01:09:20 +0000 (12:09 +1100)
commit2ced19cbae5448b720919a494606c62095d4f4db
treee011a53041289ed4f9c8e78f6d88cd3454c9c39b
parenteb40a87500ac2f6be7eaf8ebb35610e6d0e60e9a
xfs: make AIL tail pushing independent of the grant lock

The xlog_grant_push_ail() currently takes the grant lock internally to sample
the tail lsn, last sync lsn and the reserve grant head. Most of the callers
already hold the grant lock but have to drop it before calling
xlog_grant_push_ail(). This is a left over from when the AIL tail pushing was
done in line and hence xlog_grant_push_ail had to drop the grant lock. AIL push
is now done in another thread and hence we can safely hold the grant lock over
the entire xlog_grant_push_ail call.

Push the grant lock outside of xlog_grant_push_ail() to simplify the locking
and synchronisation needed for tail pushing.  This will reduce traffic on the
grant lock by itself, but this is only one step in preparing for the complete
removal of the grant lock.

While there, clean up the formatting of xlog_grant_push_ail() to match the
rest of the XFS code.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_log.c