Commit 3c45bfc1 authored by Dulshani Gunawardhana's avatar Dulshani Gunawardhana Committed by Chris Mason

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: default avatarDulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: default avatarZach Brown <zab@redhat.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 95e94d14
...@@ -43,9 +43,8 @@ struct btrfs_device { ...@@ -43,9 +43,8 @@ struct btrfs_device {
/* WRITE_SYNC bios */ /* WRITE_SYNC bios */
struct btrfs_pending_bios pending_sync_bios; struct btrfs_pending_bios pending_sync_bios;
int running_pending;
u64 generation; u64 generation;
int running_pending;
int writeable; int writeable;
int in_fs_metadata; int in_fs_metadata;
int missing; int missing;
...@@ -53,11 +52,11 @@ struct btrfs_device { ...@@ -53,11 +52,11 @@ struct btrfs_device {
int is_tgtdev_for_dev_replace; int is_tgtdev_for_dev_replace;
spinlock_t io_lock; spinlock_t io_lock;
/* the mode sent to blkdev_get */
fmode_t mode;
struct block_device *bdev; struct block_device *bdev;
/* the mode sent to blkdev_get */
fmode_t mode;
struct rcu_string *name; struct rcu_string *name;
...@@ -78,16 +77,21 @@ struct btrfs_device { ...@@ -78,16 +77,21 @@ struct btrfs_device {
/* optimal io width for this device */ /* optimal io width for this device */
u32 io_width; u32 io_width;
/* type and info about this device */
u64 type;
/* minimal io size for this device */ /* minimal io size for this device */
u32 sector_size; u32 sector_size;
/* type and info about this device */
u64 type;
/* physical drive uuid (or lvm uuid) */ /* physical drive uuid (or lvm uuid) */
u8 uuid[BTRFS_UUID_SIZE]; u8 uuid[BTRFS_UUID_SIZE];
/* for sending down flush barriers */
int nobarriers;
struct bio *flush_bio;
struct completion flush_wait;
/* per-device scrub information */ /* per-device scrub information */
struct scrub_ctx *scrub_device; struct scrub_ctx *scrub_device;
...@@ -103,10 +107,6 @@ struct btrfs_device { ...@@ -103,10 +107,6 @@ struct btrfs_device {
struct radix_tree_root reada_zones; struct radix_tree_root reada_zones;
struct radix_tree_root reada_extents; struct radix_tree_root reada_extents;
/* for sending down flush barriers */
struct bio *flush_bio;
struct completion flush_wait;
int nobarriers;
/* disk I/O failure stats. For detailed description refer to /* disk I/O failure stats. For detailed description refer to
* enum btrfs_dev_stat_values in ioctl.h */ * enum btrfs_dev_stat_values in ioctl.h */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment