]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-snap.h
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[linux-2.6-omap-h63xx.git] / drivers / md / dm-snap.h
index 24f9fb73b982d0cd148ef15d56428ba6c7ce6877..f07315fe23621e706bae67ab240d2bb8d89c42d3 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef DM_SNAPSHOT_H
 #define DM_SNAPSHOT_H
 
-#include "dm.h"
+#include <linux/device-mapper.h>
 #include "dm-bio-list.h"
 #include <linux/blkdev.h>
 #include <linux/workqueue.h>
@@ -130,6 +130,10 @@ struct exception_store {
        void *context;
 };
 
+#define DM_TRACKED_CHUNK_HASH_SIZE     16
+#define DM_TRACKED_CHUNK_HASH(x)       ((unsigned long)(x) & \
+                                        (DM_TRACKED_CHUNK_HASH_SIZE - 1))
+
 struct dm_snapshot {
        struct rw_semaphore lock;
        struct dm_target *ti;
@@ -154,8 +158,7 @@ struct dm_snapshot {
        /* Used for display of table */
        char type;
 
-       /* The last percentage we notified */
-       int last_percent;
+       mempool_t *pending_pool;
 
        struct exception_table pending;
        struct exception_table complete;
@@ -174,6 +177,11 @@ struct dm_snapshot {
        /* Queue of snapshot writes for ksnapd to flush */
        struct bio_list queued_bios;
        struct work_struct queued_bios_work;
+
+       /* Chunks with outstanding reads */
+       mempool_t *tracked_chunk_pool;
+       spinlock_t tracked_chunk_lock;
+       struct hlist_head tracked_chunk_hash[DM_TRACKED_CHUNK_HASH_SIZE];
 };
 
 /*