diff mbox

[25,of,33] DM Exception Store: add shared_uuid

Message ID 200903252137.n2PLblqg022419@hydrogen.msp.redhat.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Jonthan Brassow March 25, 2009, 9:37 p.m. UTC
Patch name: dm-exception-store-add-shared_uuid.patch

This patch adds the shared_uuid to the dm_exception_store structure.
Exception store implementations can set this to a unique non-zero
value if they wish to express that the back-end is optimized for
sharing.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

Index: linux-2.6/drivers/md/dm-exception-store.h
===================================================================
--- linux-2.6.orig/drivers/md/dm-exception-store.h
+++ linux-2.6/drivers/md/dm-exception-store.h
@@ -97,6 +97,16 @@  struct dm_exception_store {
 
 	struct dm_dev *cow;
 
+	/*
+	 * If the underlying exception store implementation is shared,
+	 * it can set 'shared_uuid' to identify which 'dm_exception_store's
+	 * share the same underlying implementation specific store.
+	 *
+	 * The user can use this ID to consolidate work/structures in
+	 * the upper layers.
+	 */
+	uint64_t shared_uuid;
+
 	/* Size of data blocks saved - must be a power of 2 */
 	chunk_t chunk_size;
 	chunk_t chunk_mask;
Index: linux-2.6/drivers/md/dm-exception-store.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-exception-store.c
+++ linux-2.6/drivers/md/dm-exception-store.c
@@ -218,6 +218,7 @@  int dm_exception_store_create(const char
 
 	tmp_store->type = type;
 	tmp_store->ti = ti;
+	tmp_store->shared_uuid = 0;
 
 	/*
 	 * COW-dev and chunk_size are common to all types of