Skip to content

Commit 7a832b8

Browse files
fdmananakdave
authored andcommitted
btrfs: place all boolean fields together in struct find_free_extent_ctl
Move the 'retry_uncached' and 'hint' fields close to the other boolean fields so that we remove a hole from the structure and reduce its size from 136 bytes down to 128 bytes. Currently this structure is only allocated in the stack of btrfs_reserve_extent(). Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e21756f commit 7a832b8

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

fs/btrfs/extent-tree.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ struct find_free_extent_ctl {
4949
/* Allocation is called for data relocation */
5050
bool for_data_reloc;
5151

52+
/*
53+
* Set to true if we're retrying the allocation on this block group
54+
* after waiting for caching progress, this is so that we retry only
55+
* once before moving on to another block group.
56+
*/
57+
bool retry_uncached;
58+
59+
/* Whether or not the allocator is currently following a hint. */
60+
bool hinted;
61+
5262
/* RAID index, converted from flags */
5363
int index;
5464

@@ -57,13 +67,6 @@ struct find_free_extent_ctl {
5767
*/
5868
int loop;
5969

60-
/*
61-
* Set to true if we're retrying the allocation on this block group
62-
* after waiting for caching progress, this is so that we retry only
63-
* once before moving on to another block group.
64-
*/
65-
bool retry_uncached;
66-
6770
/* If current block group is cached */
6871
int cached;
6972

@@ -82,9 +85,6 @@ struct find_free_extent_ctl {
8285
/* Allocation policy */
8386
enum btrfs_extent_allocation_policy policy;
8487

85-
/* Whether or not the allocator is currently following a hint */
86-
bool hinted;
87-
8888
/* Size class of block groups to prefer in early loops */
8989
enum btrfs_block_group_size_class size_class;
9090
};

0 commit comments

Comments
 (0)