diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-15 09:22:56 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 10:06:58 -0500 |
commit | da17066c40472c2d6a1aab7bb0090c3d285531c9 (patch) | |
tree | f51910799ffea3bfe5af34d009a2967b9e99e6ad /fs/btrfs/check-integrity.c | |
parent | f15376df0dc2b632eb689793a73d4adba8404987 (diff) |
btrfs: pull node/sector/stripe sizes out of root and into fs_info
We track the node sizes per-root, but they never vary from the values
in the superblock. This patch messes with the 80-column style a bit,
but subsequent patches to factor out root->fs_info into a convenience
variable fix it up again.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/check-integrity.c')
-rw-r--r-- | fs/btrfs/check-integrity.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 91f6bd9124d9..a6243ccd9800 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c | |||
@@ -2911,14 +2911,14 @@ int btrfsic_mount(struct btrfs_root *root, | |||
2911 | struct list_head *dev_head = &fs_devices->devices; | 2911 | struct list_head *dev_head = &fs_devices->devices; |
2912 | struct btrfs_device *device; | 2912 | struct btrfs_device *device; |
2913 | 2913 | ||
2914 | if (root->nodesize & ((u64)PAGE_SIZE - 1)) { | 2914 | if (root->fs_info->nodesize & ((u64)PAGE_SIZE - 1)) { |
2915 | pr_info("btrfsic: cannot handle nodesize %d not being a multiple of PAGE_SIZE %ld!\n", | 2915 | pr_info("btrfsic: cannot handle nodesize %d not being a multiple of PAGE_SIZE %ld!\n", |
2916 | root->nodesize, PAGE_SIZE); | 2916 | root->fs_info->nodesize, PAGE_SIZE); |
2917 | return -1; | 2917 | return -1; |
2918 | } | 2918 | } |
2919 | if (root->sectorsize & ((u64)PAGE_SIZE - 1)) { | 2919 | if (root->fs_info->sectorsize & ((u64)PAGE_SIZE - 1)) { |
2920 | pr_info("btrfsic: cannot handle sectorsize %d not being a multiple of PAGE_SIZE %ld!\n", | 2920 | pr_info("btrfsic: cannot handle sectorsize %d not being a multiple of PAGE_SIZE %ld!\n", |
2921 | root->sectorsize, PAGE_SIZE); | 2921 | root->fs_info->sectorsize, PAGE_SIZE); |
2922 | return -1; | 2922 | return -1; |
2923 | } | 2923 | } |
2924 | state = kzalloc(sizeof(*state), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); | 2924 | state = kzalloc(sizeof(*state), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); |
@@ -2940,8 +2940,8 @@ int btrfsic_mount(struct btrfs_root *root, | |||
2940 | state->print_mask = print_mask; | 2940 | state->print_mask = print_mask; |
2941 | state->include_extent_data = including_extent_data; | 2941 | state->include_extent_data = including_extent_data; |
2942 | state->csum_size = 0; | 2942 | state->csum_size = 0; |
2943 | state->metablock_size = root->nodesize; | 2943 | state->metablock_size = root->fs_info->nodesize; |
2944 | state->datablock_size = root->sectorsize; | 2944 | state->datablock_size = root->fs_info->sectorsize; |
2945 | INIT_LIST_HEAD(&state->all_blocks_list); | 2945 | INIT_LIST_HEAD(&state->all_blocks_list); |
2946 | btrfsic_block_hashtable_init(&state->block_hashtable); | 2946 | btrfsic_block_hashtable_init(&state->block_hashtable); |
2947 | btrfsic_block_link_hashtable_init(&state->block_link_hashtable); | 2947 | btrfsic_block_link_hashtable_init(&state->block_link_hashtable); |