• D
    xfs: don't try to write a start record into every iclog · 7ec94921
    Dave Chinner 提交于
    The xlog_write() function iterates over iclogs until it completes
    writing all the log vectors passed in. The ticket tracks whether
    a start record has been written or not, so only the first iclog gets
    a start record. We only ever pass single use tickets to
    xlog_write() so we only ever need to write a start record once per
    xlog_write() call.
    
    Hence we don't need to store whether we should write a start record
    in the ticket as the callers provide all the information we need to
    determine if a start record should be written. For the moment, we
    have to ensure that we clear the XLOG_TIC_INITED appropriately so
    the code in xfs_log_done() still works correctly for committing
    transactions.
    
    (darrick: Note the slight behavior change that we always deduct the
    size of the op header from the ticket, even for unmount records)
    Signed-off-by: NDave Chinner <dchinner@redhat.com>
    [hch: pass an explicit need_start_rec argument]
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Reviewed-by: NBrian Foster <bfoster@redhat.com>
    Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
    7ec94921
xfs_log_priv.h 20.9 KB