]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/xfs/xfs_log.h
xfs: split tail_lsn assignments from log space wakeups
authorChristoph Hellwig <hch@infradead.org>
Mon, 20 Feb 2012 02:31:20 +0000 (02:31 +0000)
committerBen Myers <bpm@sgi.com>
Thu, 23 Feb 2012 04:17:00 +0000 (22:17 -0600)
commit09a423a3d6c70905f1090f01aadb8e6abff527ce
tree7bbe94301c348add4bb9e11b253b3f9617ef3573
parent70b5437653d9c6c8de287affd38836cce98ebde5
xfs: split tail_lsn assignments from log space wakeups

Currently xfs_log_move_tail has a tail_lsn argument that is horribly
overloaded: it may contain either an actual lsn to assign to the log tail,
0 as a special case to use the last sync LSN, or 1 to indicate that no tail
LSN assignment should be performed, and we should opportunisticly wake up
at one task waiting for log space even if we did not move the LSN.

Remove the tail lsn assigned from xfs_log_move_tail and make the two callers
use xlog_assign_tail_lsn instead of the current variant of partially using
the code in xfs_log_move_tail and partially opencoding it.  Note that means
we grow an addition lock roundtrip on the AIL lock for each bulk update
or delete, which is still far less than what we had before introducing the
bulk operations.  If this proves to be a problem we can still add a variant
of xlog_assign_tail_lsn that expects the lock to be held already.

Also rename the remainder of xfs_log_move_tail to xfs_log_space_wake as
that name describes its functionality much better.

Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_log.c
fs/xfs/xfs_log.h
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_trans_ail.c