diff options
author | Mike Snitzer <snitzer@redhat.com> | 2010-03-05 21:32:33 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2010-03-05 21:32:33 -0500 |
commit | 924e600d417ead9ef67043988055ba236f114718 (patch) | |
tree | 338db5dfc0f8fe8f9aa39bd19639ad1f1dc27e46 /drivers/md | |
parent | 3abf85b5b5851b5f28d3d8a920ebb844edd08352 (diff) |
dm: eliminate some holes data structures
Eliminate a 4-byte hole in 'struct dm_io_memory' by moving 'offset' above the
'ptr' to which it applies (size reduced from 24 to 16 bytes). And by
association, 1-4 byte hole is eliminated in 'struct dm_io_request' (size
reduced from 56 to 48 bytes).
Eliminate all 6 4-byte holes and 1 cache-line in 'struct dm_snapshot' (size
reduced from 392 to 368 bytes).
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-snap.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 0789c22ff0d4..54853773510c 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -83,10 +83,10 @@ struct dm_snapshot { | |||
83 | /* Whether or not owning mapped_device is suspended */ | 83 | /* Whether or not owning mapped_device is suspended */ |
84 | int suspended; | 84 | int suspended; |
85 | 85 | ||
86 | mempool_t *pending_pool; | ||
87 | |||
88 | atomic_t pending_exceptions_count; | 86 | atomic_t pending_exceptions_count; |
89 | 87 | ||
88 | mempool_t *pending_pool; | ||
89 | |||
90 | struct dm_exception_table pending; | 90 | struct dm_exception_table pending; |
91 | struct dm_exception_table complete; | 91 | struct dm_exception_table complete; |
92 | 92 | ||
@@ -96,6 +96,11 @@ struct dm_snapshot { | |||
96 | */ | 96 | */ |
97 | spinlock_t pe_lock; | 97 | spinlock_t pe_lock; |
98 | 98 | ||
99 | /* Chunks with outstanding reads */ | ||
100 | spinlock_t tracked_chunk_lock; | ||
101 | mempool_t *tracked_chunk_pool; | ||
102 | struct hlist_head tracked_chunk_hash[DM_TRACKED_CHUNK_HASH_SIZE]; | ||
103 | |||
99 | /* The on disk metadata handler */ | 104 | /* The on disk metadata handler */ |
100 | struct dm_exception_store *store; | 105 | struct dm_exception_store *store; |
101 | 106 | ||
@@ -105,10 +110,12 @@ struct dm_snapshot { | |||
105 | struct bio_list queued_bios; | 110 | struct bio_list queued_bios; |
106 | struct work_struct queued_bios_work; | 111 | struct work_struct queued_bios_work; |
107 | 112 | ||
108 | /* Chunks with outstanding reads */ | 113 | /* Wait for events based on state_bits */ |
109 | mempool_t *tracked_chunk_pool; | 114 | unsigned long state_bits; |
110 | spinlock_t tracked_chunk_lock; | 115 | |
111 | struct hlist_head tracked_chunk_hash[DM_TRACKED_CHUNK_HASH_SIZE]; | 116 | /* Range of chunks currently being merged. */ |
117 | chunk_t first_merging_chunk; | ||
118 | int num_merging_chunks; | ||
112 | 119 | ||
113 | /* | 120 | /* |
114 | * The merge operation failed if this flag is set. | 121 | * The merge operation failed if this flag is set. |
@@ -125,13 +132,6 @@ struct dm_snapshot { | |||
125 | */ | 132 | */ |
126 | int merge_failed; | 133 | int merge_failed; |
127 | 134 | ||
128 | /* Wait for events based on state_bits */ | ||
129 | unsigned long state_bits; | ||
130 | |||
131 | /* Range of chunks currently being merged. */ | ||
132 | chunk_t first_merging_chunk; | ||
133 | int num_merging_chunks; | ||
134 | |||
135 | /* | 135 | /* |
136 | * Incoming bios that overlap with chunks being merged must wait | 136 | * Incoming bios that overlap with chunks being merged must wait |
137 | * for them to be committed. | 137 | * for them to be committed. |