Commit 23d1f737 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: remove unused sectorsize member

The sectorsize member of btrfs_block_group_cache is unused. So remove it, this
reduces the number of holes in the struct.

With patch:
/* size: 856, cachelines: 14, members: 40 */
/* sum members: 837, holes: 4, sum holes: 19 */
/* bit holes: 1, sum bit holes: 29 bits */
/* last cacheline: 24 bytes */

Without patch:
/* size: 864, cachelines: 14, members: 41 */
/* sum members: 841, holes: 5, sum holes: 23 */
/* bit holes: 1, sum bit holes: 29 bits */
/* last cacheline: 32 bytes */
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent f148ef4d
......@@ -558,7 +558,6 @@ struct btrfs_block_group_cache {
u64 bytes_super;
u64 flags;
u64 cache_generation;
u32 sectorsize;
/*
* If the free space extent count exceeds this number, convert the block
......
......@@ -9952,7 +9952,6 @@ btrfs_create_block_group_cache(struct btrfs_fs_info *fs_info,
cache->key.offset = size;
cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
cache->sectorsize = fs_info->sectorsize;
cache->fs_info = fs_info;
cache->full_stripe_len = btrfs_full_stripe_len(fs_info,
&fs_info->mapping_tree,
......
......@@ -211,7 +211,6 @@ btrfs_alloc_dummy_block_group(struct btrfs_fs_info *fs_info,
cache->key.objectid = 0;
cache->key.offset = length;
cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
cache->sectorsize = fs_info->sectorsize;
cache->full_stripe_len = fs_info->sectorsize;
cache->fs_info = fs_info;
......
......@@ -81,7 +81,7 @@ static int __check_free_space_extents(struct btrfs_trans_handle *trans,
i++;
}
prev_bit = bit;
offset += cache->sectorsize;
offset += fs_info->sectorsize;
}
}
if (prev_bit == 1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment