diff options
author | David Sterba <dsterba@suse.cz> | 2014-06-04 13:22:26 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 16:37:14 -0400 |
commit | 707e8a071528385a87b63a72a37c2322e463c7b8 (patch) | |
tree | 02fa581efa4d2a05b4e786a553cf9e88bd6274b3 /fs/btrfs/qgroup.c | |
parent | 962a298f35110edd8f326814ae41a3dd306ecb64 (diff) |
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>
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r-- | fs/btrfs/qgroup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index ded5c601d916..2ce4ce7b47d8 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
@@ -2237,7 +2237,6 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, | |||
2237 | if (srcid) { | 2237 | if (srcid) { |
2238 | struct btrfs_root *srcroot; | 2238 | struct btrfs_root *srcroot; |
2239 | struct btrfs_key srckey; | 2239 | struct btrfs_key srckey; |
2240 | int srcroot_level; | ||
2241 | 2240 | ||
2242 | srckey.objectid = srcid; | 2241 | srckey.objectid = srcid; |
2243 | srckey.type = BTRFS_ROOT_ITEM_KEY; | 2242 | srckey.type = BTRFS_ROOT_ITEM_KEY; |
@@ -2249,8 +2248,7 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, | |||
2249 | } | 2248 | } |
2250 | 2249 | ||
2251 | rcu_read_lock(); | 2250 | rcu_read_lock(); |
2252 | srcroot_level = btrfs_header_level(srcroot->node); | 2251 | level_size = srcroot->nodesize; |
2253 | level_size = btrfs_level_size(srcroot, srcroot_level); | ||
2254 | rcu_read_unlock(); | 2252 | rcu_read_unlock(); |
2255 | } | 2253 | } |
2256 | 2254 | ||
@@ -2566,7 +2564,7 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path, | |||
2566 | found.type != BTRFS_METADATA_ITEM_KEY) | 2564 | found.type != BTRFS_METADATA_ITEM_KEY) |
2567 | continue; | 2565 | continue; |
2568 | if (found.type == BTRFS_METADATA_ITEM_KEY) | 2566 | if (found.type == BTRFS_METADATA_ITEM_KEY) |
2569 | num_bytes = fs_info->extent_root->leafsize; | 2567 | num_bytes = fs_info->extent_root->nodesize; |
2570 | else | 2568 | else |
2571 | num_bytes = found.offset; | 2569 | num_bytes = found.offset; |
2572 | 2570 | ||