aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap.h')
-rw-r--r--drivers/md/dm-snap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/dm-snap.h b/drivers/md/dm-snap.h
index 24f9fb73b982..292c15609ae3 100644
--- a/drivers/md/dm-snap.h
+++ b/drivers/md/dm-snap.h
@@ -130,6 +130,10 @@ struct exception_store {
130 void *context; 130 void *context;
131}; 131};
132 132
133#define DM_TRACKED_CHUNK_HASH_SIZE 16
134#define DM_TRACKED_CHUNK_HASH(x) ((unsigned long)(x) & \
135 (DM_TRACKED_CHUNK_HASH_SIZE - 1))
136
133struct dm_snapshot { 137struct dm_snapshot {
134 struct rw_semaphore lock; 138 struct rw_semaphore lock;
135 struct dm_target *ti; 139 struct dm_target *ti;
@@ -157,6 +161,8 @@ struct dm_snapshot {
157 /* The last percentage we notified */ 161 /* The last percentage we notified */
158 int last_percent; 162 int last_percent;
159 163
164 mempool_t *pending_pool;
165
160 struct exception_table pending; 166 struct exception_table pending;
161 struct exception_table complete; 167 struct exception_table complete;
162 168
@@ -174,6 +180,11 @@ struct dm_snapshot {
174 /* Queue of snapshot writes for ksnapd to flush */ 180 /* Queue of snapshot writes for ksnapd to flush */
175 struct bio_list queued_bios; 181 struct bio_list queued_bios;
176 struct work_struct queued_bios_work; 182 struct work_struct queued_bios_work;
183
184 /* Chunks with outstanding reads */
185 mempool_t *tracked_chunk_pool;
186 spinlock_t tracked_chunk_lock;
187 struct hlist_head tracked_chunk_hash[DM_TRACKED_CHUNK_HASH_SIZE];
177}; 188};
178 189
179/* 190/*