OSDN Git Service

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)
commit5693384805ab2a3d474efccb968e32f9e2edbaf7
tree1edc11c54c1d8144d41d04cefc44b6dc77754aad
parent94860a301b759ade6bbcf89ea7f5d19b3e2bf6d1
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