summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-11-07 19:54:33 -0500
committerDavid Sterba <dsterba@suse.com>2018-01-22 10:08:14 -0500
commit5302e0896445ac3a9c707bd42c39c58a49959980 (patch)
tree71ebb14db4375fa265cf437d1b1a5c637ae7558c /fs/btrfs/transaction.h
parent165c8b022c492f7eb33f7c936ac063a6fd4e90a3 (diff)
btrfs: reorder btrfs_transaction members for better packing
There are now 20 bytes of holes, we can reduce that to 4 by minor changes. Moving 'aborted' to the status and flags is also more logical, similar for num_dirty_bgs. The size goes from 432 to 416. Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r--fs/btrfs/transaction.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index 1805fd101767..6beee072b1bd 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -58,6 +58,7 @@ struct btrfs_transaction {
58 58
59 /* Be protected by fs_info->trans_lock when we want to change it. */ 59 /* Be protected by fs_info->trans_lock when we want to change it. */
60 enum btrfs_trans_state state; 60 enum btrfs_trans_state state;
61 int aborted;
61 struct list_head list; 62 struct list_head list;
62 struct extent_io_tree dirty_pages; 63 struct extent_io_tree dirty_pages;
63 unsigned long start_time; 64 unsigned long start_time;
@@ -70,7 +71,6 @@ struct btrfs_transaction {
70 struct list_head dirty_bgs; 71 struct list_head dirty_bgs;
71 struct list_head io_bgs; 72 struct list_head io_bgs;
72 struct list_head dropped_roots; 73 struct list_head dropped_roots;
73 unsigned int num_dirty_bgs;
74 74
75 /* 75 /*
76 * we need to make sure block group deletion doesn't race with 76 * we need to make sure block group deletion doesn't race with
@@ -79,11 +79,11 @@ struct btrfs_transaction {
79 */ 79 */
80 struct mutex cache_write_mutex; 80 struct mutex cache_write_mutex;
81 spinlock_t dirty_bgs_lock; 81 spinlock_t dirty_bgs_lock;
82 unsigned int num_dirty_bgs;
82 /* Protected by spin lock fs_info->unused_bgs_lock. */ 83 /* Protected by spin lock fs_info->unused_bgs_lock. */
83 struct list_head deleted_bgs; 84 struct list_head deleted_bgs;
84 spinlock_t dropped_roots_lock; 85 spinlock_t dropped_roots_lock;
85 struct btrfs_delayed_ref_root delayed_refs; 86 struct btrfs_delayed_ref_root delayed_refs;
86 int aborted;
87 struct btrfs_fs_info *fs_info; 87 struct btrfs_fs_info *fs_info;
88}; 88};
89 89