btrfs-progs: Refactor sectorsize users in mkfs/main.c

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
This commit is contained in:
Qu Wenruo 2017-05-18 10:00:01 +08:00 committed by David Sterba
parent b2615be24a
commit b0f14e9b3d
1 changed files with 2 additions and 2 deletions

View File

@ -451,7 +451,7 @@ static int fill_inode_item(struct btrfs_trans_handle *trans,
struct btrfs_inode_item *dst, struct stat *src)
{
u64 blocks = 0;
u64 sectorsize = root->sectorsize;
u64 sectorsize = root->fs_info->sectorsize;
/*
* btrfs_inode_item has some reserved fields
@ -652,7 +652,7 @@ static int add_file_items(struct btrfs_trans_handle *trans,
u64 bytes_read = 0;
struct btrfs_key key;
int blocks;
u32 sectorsize = root->sectorsize;
u32 sectorsize = root->fs_info->sectorsize;
u64 first_block = 0;
u64 file_pos = 0;
u64 cur_bytes;