xfs: move setting bt_logical_sectorsize out of xfs_setsize_buftarg
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Feb 2024 20:42:45 +0000 (12:42 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:42:45 +0000 (12:42 -0800)
commit1c51ac0998ed9baaca3ac75c0083b4c3b4d993ef
tree2142d74349cc66e73a5c9c17481c0ae8201fed8f
parent60335cc0fb5c7a8adfc84ba7dc976a00b6133499
xfs: move setting bt_logical_sectorsize out of xfs_setsize_buftarg

bt_logical_sectorsize and the associated mask is set based on the
constant logical block size in the block_device structure and thus
doesn't need to be updated in xfs_setsize_buftarg.  Move it into
xfs_alloc_buftarg so that it is only done once per buftarg.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_buf.c