Skip to contentSkip to conversation

dm-exception-store API

PATCH New Jonathan Brassow 1 participant 1 message Nov 13, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm-exception-store API

brassow

I took the liberty of refactoring the shared exception store code. It now aligns nicely with the interface instead of altering all sorts of things that it should not have been. 'message' interface is gone, no need to pass around snapid's, it's now a module, etc...

I didn't spend huge amounts of time on this. It compiles, but there are probably some bugs there now. I would also like to see a 'UUID -> snapid' translation added to the code. This would eliminate the need to go around asking which indices are open for use. The translation table could be stored in the on-disk header.

get_[shared|unique]_info functions need to be macros... function args should be cleaned up... etc.

- brassow

drivers/md/Kconfig +8 -0
Index: linux-2.6/drivers/md/Kconfig
===================================================================
@@ -249,6 +249,14 @@ config DM_SNAPSHOT
        ---help---
          Allow volume managers to take writable snapshots of a device.
 
+config DM_EXSTORE_SHARED
+	tristate "Shared exception store (EXPERIMENTAL)"
+	depends on DM_SNAPSHOT && EXPERIMENTAL
+	---help---
+	  Exception stores are used primarily by snapshots to track
+	  COW data.  A shared exception store allows multiple
+	  snapshots to utilize the same exception store device.
+
 config DM_MIRROR
        tristate "Mirror target"
        depends on BLK_DEV_DM
drivers/md/Makefile +2 -0
Index: linux-2.6/drivers/md/Makefile
===================================================================
@@ -6,6 +6,7 @@ dm-mod-objs	:= dm.o dm-table.o dm-target
 		   dm-ioctl.o dm-io.o dm-kcopyd.o
 dm-multipath-objs := dm-path-selector.o dm-mpath.o
 dm-snapshot-objs := dm-snap.o dm-exception-store.o
+dm-exstore-shared-objs := dm-ex-store-shared.o
 dm-mirror-objs	:= dm-raid1.o
 md-mod-objs     := md.o bitmap.o
 raid456-objs	:= raid5.o raid6algos.o raid6recov.o raid6tables.o \
@@ -34,6 +35,7 @@ obj-$(CONFIG_DM_CRYPT)		+= dm-crypt.o
 obj-$(CONFIG_DM_DELAY)		+= dm-delay.o
 obj-$(CONFIG_DM_MULTIPATH)	+= dm-multipath.o dm-round-robin.o
 obj-$(CONFIG_DM_SNAPSHOT)	+= dm-snapshot.o
+obj-$(CONFIG_DM_EXSTORE_SHARED)	+= dm-exstore-shared.o
 obj-$(CONFIG_DM_MIRROR)		+= dm-mirror.o dm-log.o dm-region-hash.o
 obj-$(CONFIG_DM_ZERO)		+= dm-zero.o
 
drivers/md/dm-ex-store-shared.c new file +1870 -0

1,870 lines not on this page · raw message