]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: factor out splitting of an iclog from xlog_sync
authorChristoph Hellwig <hch@lst.de>
Sat, 29 Jun 2019 02:27:22 +0000 (19:27 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 29 Jun 2019 02:27:22 +0000 (19:27 -0700)
commitdaa73363c84493f2f1c40dd007471232a181f4fd
tree1edc11c54c1d8144d41d04cefc44b6dc77754aad
parentbfa2c1bf3219c322a0ae2713c1e69b24fb8b12ba
xfs: factor out splitting of an iclog from xlog_sync

Split out a self-contained chunk of code from xlog_sync that calculates
the split offset for an iclog that wraps the log end and bumps the
cycles for the second half.

Use the chance to bring some sanity to the variables used to track the
split in xlog_sync by not changing the count variable, and instead use
split as the offset for the split and use those to calculate the
sizes and offsets for the two write buffers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_log.c