• C
    xfs: split tail_lsn assignments from log space wakeups · 09a423a3
    Christoph Hellwig 提交于
    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: NMark Tinguely <tinguely@sgi.com>
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Reviewed-by: NDave Chinner <dchinner@redhat.com>
    Signed-off-by: NBen Myers <bpm@sgi.com>
    09a423a3
xfs_log.c 102.2 KB