]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: clean up the initial read logic in xfs_readsb
authorChristoph Hellwig <hch@lst.de>
Mon, 7 Jul 2025 12:53:12 +0000 (14:53 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 8 Jul 2025 11:30:26 +0000 (13:30 +0200)
commita578a8efa707cc99c22960e86e5b9eaeeda97c5e
tree068177d8122f0e122cb989876041e3056b7b91b1
parentf2eb2796b95118b877b63d9fcd3459e70494a498
xfs: clean up the initial read logic in xfs_readsb

The initial sb read is always for a device logical block size buffer.
The device logical block size is provided in the bt_logical_sectorsize in
struct buftarg, so use that instead of the confusingly named
xfs_getsize_buftarg buffer that reads it from the bdev.

Update the comments surrounding the code to better describe what is going
on.

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