]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: introduce xlog_write_partial()
authorDave Chinner <dchinner@redhat.com>
Thu, 21 Apr 2022 00:36:15 +0000 (10:36 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 21 Apr 2022 00:36:15 +0000 (10:36 +1000)
commitb1e0c523b775588016c33a19b488420d100c47d9
tree9786c41aea4121467f5ad1fc640577677ecc9ac3
parent8cd502127ead7a2f12409f5e03f48aec25816cd5
xfs: introduce xlog_write_partial()

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: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_log.c
fs/xfs/xfs_log_priv.h