btrfs: use nodesize everywhere, kill leafsize
The nodesize and leafsize were never of different values. Unify the usage and make nodesize the one. Cleanup the redundant checks and helpers. Shaves a few bytes from .text: text data bss dec hex filename 852418 24560 23112 900090 dbbfa btrfs.ko.before 851074 24584 23112 898770 db6d2 btrfs.ko.after Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:

committed by
Chris Mason

parent
962a298f35
commit
707e8a0715
@@ -820,7 +820,6 @@ static int btrfsic_process_superblock_dev_mirror(
|
||||
btrfs_super_magic(super_tmp) != BTRFS_MAGIC ||
|
||||
memcmp(device->uuid, super_tmp->dev_item.uuid, BTRFS_UUID_SIZE) ||
|
||||
btrfs_super_nodesize(super_tmp) != state->metablock_size ||
|
||||
btrfs_super_leafsize(super_tmp) != state->metablock_size ||
|
||||
btrfs_super_sectorsize(super_tmp) != state->datablock_size) {
|
||||
brelse(bh);
|
||||
return 0;
|
||||
@@ -3120,24 +3119,12 @@ int btrfsic_mount(struct btrfs_root *root,
|
||||
struct list_head *dev_head = &fs_devices->devices;
|
||||
struct btrfs_device *device;
|
||||
|
||||
if (root->nodesize != root->leafsize) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle nodesize %d != leafsize %d!\n",
|
||||
root->nodesize, root->leafsize);
|
||||
return -1;
|
||||
}
|
||||
if (root->nodesize & ((u64)PAGE_CACHE_SIZE - 1)) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle nodesize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
|
||||
root->nodesize, PAGE_CACHE_SIZE);
|
||||
return -1;
|
||||
}
|
||||
if (root->leafsize & ((u64)PAGE_CACHE_SIZE - 1)) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle leafsize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
|
||||
root->leafsize, PAGE_CACHE_SIZE);
|
||||
return -1;
|
||||
}
|
||||
if (root->sectorsize & ((u64)PAGE_CACHE_SIZE - 1)) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle sectorsize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
|
||||
|
Reference in New Issue
Block a user