• Dave Chinner's avatar
    xfs: introduce xlog_write_partial() · ad3e3693
    Dave Chinner authored
    Re-implement writing of a log vector that does not fit into the
    current iclog. The iclog will already be in XLOG_STATE_WANT_SYNC
    because xlog_get_iclog_space() will have reserved all the remaining
    iclog space for us, hence we can simply iterate over the iovecs in
    the log vector getting more iclog space until the entire log vector
    is written.
    
    Handling this partial write case separately means we do need to pass
    unnecessary state around for the common, fast path case when the log
    vector fits entirely within the current iclog. It isolates the
    complexity and allows us to modify and improve the partial write
    case without impacting the simple fast path.
    
    This change includes several improvements incorporated from patches
    written by Christoph Hellwig.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChandan Babu R <chandan.babu@oracle.com>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    ad3e3693
xfs_log.c 111 KB