diff options
author | Mike Snitzer <snitzer@redhat.com> | 2012-06-02 19:29:43 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-06-02 19:29:43 -0400 |
commit | 1fbdd2b3a3cf77f77b0cdf25dd969241ea2c0ce1 (patch) | |
tree | 935f78f27afba09ec1784f5bac96454b43ed718a /drivers | |
parent | 76e10d158efb6d4516018846f60c2ab5501900bc (diff) |
dm mpath: reduce size of struct multipath
Move multipath structure's 'lock' and 'queue_size' members to eliminate
two 4-byte holes. Also use a bit within a single unsigned int for each
existing flag (saves 8-bytes). This allows future flags to be added
without each consuming an unsigned int.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-mpath.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 754f38f8a69..c35160786cf 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -61,11 +61,11 @@ struct multipath { | |||
61 | struct list_head list; | 61 | struct list_head list; |
62 | struct dm_target *ti; | 62 | struct dm_target *ti; |
63 | 63 | ||
64 | spinlock_t lock; | ||
65 | |||
66 | const char *hw_handler_name; | 64 | const char *hw_handler_name; |
67 | char *hw_handler_params; | 65 | char *hw_handler_params; |
68 | 66 | ||
67 | spinlock_t lock; | ||
68 | |||
69 | unsigned nr_priority_groups; | 69 | unsigned nr_priority_groups; |
70 | struct list_head priority_groups; | 70 | struct list_head priority_groups; |
71 | 71 | ||
@@ -81,16 +81,17 @@ struct multipath { | |||
81 | struct priority_group *next_pg; /* Switch to this PG if set */ | 81 | struct priority_group *next_pg; /* Switch to this PG if set */ |
82 | unsigned repeat_count; /* I/Os left before calling PS again */ | 82 | unsigned repeat_count; /* I/Os left before calling PS again */ |
83 | 83 | ||
84 | unsigned queue_io; /* Must we queue all I/O? */ | 84 | unsigned queue_io:1; /* Must we queue all I/O? */ |
85 | unsigned queue_if_no_path; /* Queue I/O if last path fails? */ | 85 | unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */ |
86 | unsigned saved_queue_if_no_path;/* Saved state during suspension */ | 86 | unsigned saved_queue_if_no_path:1; /* Saved state during suspension */ |
87 | |||
87 | unsigned pg_init_retries; /* Number of times to retry pg_init */ | 88 | unsigned pg_init_retries; /* Number of times to retry pg_init */ |
88 | unsigned pg_init_count; /* Number of times pg_init called */ | 89 | unsigned pg_init_count; /* Number of times pg_init called */ |
89 | unsigned pg_init_delay_msecs; /* Number of msecs before pg_init retry */ | 90 | unsigned pg_init_delay_msecs; /* Number of msecs before pg_init retry */ |
90 | 91 | ||
92 | unsigned queue_size; | ||
91 | struct work_struct process_queued_ios; | 93 | struct work_struct process_queued_ios; |
92 | struct list_head queued_ios; | 94 | struct list_head queued_ios; |
93 | unsigned queue_size; | ||
94 | 95 | ||
95 | struct work_struct trigger_event; | 96 | struct work_struct trigger_event; |
96 | 97 | ||