]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
xfs: hide log iovec alignment constraints
authorDave Chinner <dchinner@redhat.com>
Wed, 4 May 2022 01:45:50 +0000 (11:45 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 4 May 2022 01:45:50 +0000 (11:45 +1000)
commitb2c28035cea290edbcec697504e5b7a4b1e023e7
tree2fe371632c8f256fe309422aea7110f96ed35233
parentc230a4a85bcdbfc1a7415deec6caf04e8fca1301
xfs: hide log iovec alignment constraints

Callers currently have to round out the size of buffers to match the
aligment constraints of log iovecs and xlog_write(). They should not
need to know this detail, so introduce a new function to calculate
the iovec length (for use in ->iop_size implementations). Also
modify xlog_finish_iovec() to round up the length to the correct
alignment so the callers don't need to do this, either.

Convert the only user - inode forks - of this alignment rounding to
use the new interface.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_inode_item_recover.c
fs/xfs/xfs_log.h