OSDN Git Service

xfs: move log iovec alignment to preparation function
authorDave Chinner <dchinner@redhat.com>
Thu, 21 Apr 2022 00:34:49 +0000 (10:34 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 21 Apr 2022 00:34:49 +0000 (10:34 +1000)
commit3c352bef8335a8d9d8f14bc0bd533df023280a72
tree9e400a4e78164afc8eca7976c9392d21058069aa
parentc7610dceed39d978ef1ee0f2ab5a3c8d2d54d120
xfs: move log iovec alignment to preparation function

To include log op headers directly into the log iovec regions that
the ophdrs wrap, we need to move the buffer alignment code from
xlog_finish_iovec() to xlog_prepare_iovec(). This is because the
xlog_op_header is only 12 bytes long, and we need the buffer that
the caller formats their data into to be 8 byte aligned.

Hence once we start prepending the ophdr in xlog_prepare_iovec(), we
are going to need to manage the padding directly to ensure that the
buffer pointer returned is correctly aligned.

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: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_log.h