diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-05-17 16:42:50 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-07-03 13:35:10 +0200 |
commit | 3c7a04e59272837b8d70f2cfdfd7173d53c72616 (patch) | |
tree | 457c3798ce7c3dab868e85e12666ff3dffd56f2a /chunk-recover.c | |
parent | 8f41197b92d711a18e473e326bf576129051b7d5 (diff) |
btrfs-progs: Remove deprecated leafsize usage
Leafsize is deprecated for a long time, and kernel has already updated
ctree.h to rename sb->leafsize to sb->__unused_leafsize.
This patch will remove normal users of leafsize:
1) Remove leafsize member from btrfs_root structure
Now only root->nodesize and root->sectorisze.
No longer root->leafsize.
2) Remove @leafsize parameter from btrfs_setup_root() function
Since no root->leafsize, no need for @leafsize parameter.
The remaining user of leafsize will be:
1) btrfs inspect-internal dump-super
Reformat the "leafsize" output to "leafsize (deprecated)" and
use le32_to_cpu() to do the cast manually.
2) mkfs
We still need to set sb->__unused_leafsize to nodesize.
Do the manual cast too.
3) convert
Same as mkfs, these two superblock setup should be merged later
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Diffstat (limited to 'chunk-recover.c')
-rw-r--r-- | chunk-recover.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/chunk-recover.c b/chunk-recover.c index 0dc8a430..cf8b3184 100644 --- a/chunk-recover.c +++ b/chunk-recover.c @@ -1450,7 +1450,6 @@ open_ctree_with_broken_chunk(struct recover_control *rc) struct extent_buffer *eb; u32 sectorsize; u32 nodesize; - u32 leafsize; u32 stripesize; int ret; @@ -1482,11 +1481,10 @@ open_ctree_with_broken_chunk(struct recover_control *rc) goto out_devices; nodesize = btrfs_super_nodesize(disk_super); - leafsize = btrfs_super_leafsize(disk_super); sectorsize = btrfs_super_sectorsize(disk_super); stripesize = btrfs_super_stripesize(disk_super); - btrfs_setup_root(nodesize, leafsize, sectorsize, stripesize, + btrfs_setup_root(nodesize, sectorsize, stripesize, fs_info->chunk_root, fs_info, BTRFS_CHUNK_TREE_OBJECTID); ret = build_device_maps_by_chunk_records(rc, fs_info->chunk_root); |