diff options
author | David Sterba <dsterba@suse.com> | 2024-01-16 17:33:20 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-03-04 16:24:46 +0100 |
commit | 4e00422ee62663e31e611d7de4d2c4aa3f8555f2 (patch) | |
tree | 27d1aaab24d585ebc910fd0a686fce447a1d0643 /fs/btrfs/super.c | |
parent | btrfs: remove duplicate recording of physical address (diff) | |
download | linux-4e00422ee62663e31e611d7de4d2c4aa3f8555f2.tar.xz linux-4e00422ee62663e31e611d7de4d2c4aa3f8555f2.zip |
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>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 101f786963d4..c45fdaf24cd1 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1767,7 +1767,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) buf->f_bavail = 0; buf->f_type = BTRFS_SUPER_MAGIC; - buf->f_bsize = dentry->d_sb->s_blocksize; + buf->f_bsize = fs_info->sectorsize; buf->f_namelen = BTRFS_NAME_LEN; /* We treat it as constant endianness (it doesn't matter _which_) |