btrfs: replace sb::s_blocksize by fs_info::sectorsize
authorDavid Sterba <dsterba@suse.com>
Tue, 16 Jan 2024 16:33:20 +0000 (17:33 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:46 +0000 (16:24 +0100)
commit4e00422ee62663e31e611d7de4d2c4aa3f8555f2
tree27d1aaab24d585ebc910fd0a686fce447a1d0643
parentc4e5b7470a3f0af78d188f8d9feb201f06de4078
btrfs: replace sb::s_blocksize by fs_info::sectorsize

The block size stored in the super block is used by subsystems outside
of btrfs and it's a copy of fs_info::sectorsize. Unify that to always
use our sectorsize, with the exception of mount where we first need to
use fixed values (4K) until we read the super block and can set the
sectorsize.

Replace all uses, in most cases it's fewer pointer indirections.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/reflink.c
fs/btrfs/send.c
fs/btrfs/super.c