diff options
author | Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com> | 2013-10-31 00:27:33 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-11 22:11:26 -0500 |
commit | 3c45bfc1528ccb8b94c06d5740854bb75f8a92fb (patch) | |
tree | c1e1084ff83d3e08f3458bfe639f6ad6ace4d63d | |
parent | 95e94d14b42c1992493ce72492351d4601b274fe (diff) |
btrfs: Pack struct btrfs_device
Pack the structure btrfs_device in volumes.h to eliminate holes detected
by pahole, thus reducing binary memory footprint.
Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r-- | fs/btrfs/volumes.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 49e0ff01143f..8b3cd142b373 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -43,9 +43,8 @@ struct btrfs_device { | |||
43 | /* WRITE_SYNC bios */ | 43 | /* WRITE_SYNC bios */ |
44 | struct btrfs_pending_bios pending_sync_bios; | 44 | struct btrfs_pending_bios pending_sync_bios; |
45 | 45 | ||
46 | int running_pending; | ||
47 | u64 generation; | 46 | u64 generation; |
48 | 47 | int running_pending; | |
49 | int writeable; | 48 | int writeable; |
50 | int in_fs_metadata; | 49 | int in_fs_metadata; |
51 | int missing; | 50 | int missing; |
@@ -53,11 +52,11 @@ struct btrfs_device { | |||
53 | int is_tgtdev_for_dev_replace; | 52 | int is_tgtdev_for_dev_replace; |
54 | 53 | ||
55 | spinlock_t io_lock; | 54 | spinlock_t io_lock; |
55 | /* the mode sent to blkdev_get */ | ||
56 | fmode_t mode; | ||
56 | 57 | ||
57 | struct block_device *bdev; | 58 | struct block_device *bdev; |
58 | 59 | ||
59 | /* the mode sent to blkdev_get */ | ||
60 | fmode_t mode; | ||
61 | 60 | ||
62 | struct rcu_string *name; | 61 | struct rcu_string *name; |
63 | 62 | ||
@@ -78,16 +77,21 @@ struct btrfs_device { | |||
78 | 77 | ||
79 | /* optimal io width for this device */ | 78 | /* optimal io width for this device */ |
80 | u32 io_width; | 79 | u32 io_width; |
80 | /* type and info about this device */ | ||
81 | u64 type; | ||
81 | 82 | ||
82 | /* minimal io size for this device */ | 83 | /* minimal io size for this device */ |
83 | u32 sector_size; | 84 | u32 sector_size; |
84 | 85 | ||
85 | /* type and info about this device */ | ||
86 | u64 type; | ||
87 | 86 | ||
88 | /* physical drive uuid (or lvm uuid) */ | 87 | /* physical drive uuid (or lvm uuid) */ |
89 | u8 uuid[BTRFS_UUID_SIZE]; | 88 | u8 uuid[BTRFS_UUID_SIZE]; |
90 | 89 | ||
90 | /* for sending down flush barriers */ | ||
91 | int nobarriers; | ||
92 | struct bio *flush_bio; | ||
93 | struct completion flush_wait; | ||
94 | |||
91 | /* per-device scrub information */ | 95 | /* per-device scrub information */ |
92 | struct scrub_ctx *scrub_device; | 96 | struct scrub_ctx *scrub_device; |
93 | 97 | ||
@@ -103,10 +107,6 @@ struct btrfs_device { | |||
103 | struct radix_tree_root reada_zones; | 107 | struct radix_tree_root reada_zones; |
104 | struct radix_tree_root reada_extents; | 108 | struct radix_tree_root reada_extents; |
105 | 109 | ||
106 | /* for sending down flush barriers */ | ||
107 | struct bio *flush_bio; | ||
108 | struct completion flush_wait; | ||
109 | int nobarriers; | ||
110 | 110 | ||
111 | /* disk I/O failure stats. For detailed description refer to | 111 | /* disk I/O failure stats. For detailed description refer to |
112 | * enum btrfs_dev_stat_values in ioctl.h */ | 112 | * enum btrfs_dev_stat_values in ioctl.h */ |