From 3c7a04e59272837b8d70f2cfdfd7173d53c72616 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 17 May 2017 16:42:50 +0800 Subject: 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 --- convert/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'convert') diff --git a/convert/common.c b/convert/common.c index f0dd2cfc..3860f3b9 100644 --- a/convert/common.c +++ b/convert/common.c @@ -128,7 +128,7 @@ static int setup_temp_super(int fd, struct btrfs_mkfs_config *cfg, */ btrfs_set_super_bytes_used(super, 6 * cfg->nodesize); btrfs_set_super_sectorsize(super, cfg->sectorsize); - btrfs_set_super_leafsize(super, cfg->nodesize); + super->__unused_leafsize = cpu_to_le32(cfg->nodesize); btrfs_set_super_nodesize(super, cfg->nodesize); btrfs_set_super_stripesize(super, cfg->stripesize); btrfs_set_super_csum_type(super, BTRFS_CSUM_TYPE_CRC32); -- cgit v1.2.3