[dm-devel] ANNOUNCE: consolidated patches for shared snapshots

Mikulas Patocka mpatocka at redhat.com
Mon Dec 8 03:41:19 UTC 2008


Hi

I released new patches for shared snapshots. The functionality is the same 
as in previous releases, but the two snapshot exception stores, one 
created by Fujita Tomonori and one by me, are consolidated and common code 
is shared.

The patches are at:
http://people.redhat.com/mpatocka/patches/kernel/new-snapshots/

The patches don't alter existing snapshot implementation, they contain 
just new files (they alter only Kconfig and Makefile to make the new files 
compilable).

The new architecture is as follows:

The module dm-multisnapshot.ko contains common code for both exception 
stores. It has basically processing and queuing IOs and attaching 
snapshots and interfacing with device mapper.

This module loads the specific module for a given exception store:
dm-store-mikulas.ko for my store or dm-store-fujita-daniel.ko for Zumastor 
store. In the target constructor, there's an argument "mikulas" or 
"fujita-daniel" that tells which module to load.

The interface is what I designed --- the point is that Fujita's code can 
be converted to use my interface, but my code cannot be converted to use 
Fujita's interface --- so if we want to drive both exception stores with 
the same userspace code (we definitely want!), then there's no other 
option but to use my interface.

The difference from Fujita's old interface is that in my interface the 
kernel selects snapshot ID when creating a new snapshots and in old 
Fujita's interface the user selected it. For my snapshot store, it is a 
design requirement that the snapshot ID is seleted by the kernel driver.

There is really almost nothing to be shared with the old snapshot code. 
The data structures and the interface are have different logic --- for the 
old snapshots, there was one small structure for the origin and several 
big structures for the snapshots; for the new snapshots, there is one big 
structure for the origin and several small structures for the snapshots. 
So I wouldn't recommend to attempt to glue the new code on the old 
snapshots.

For Fujita:
You can take the file that I created and continue development on it.
I fixed some other bugs or non-portable constructs in the code, I marked 
them as comments so that you can review the fixes. I took the code from 
ftp://ftp.kernel.org/pub/linux/kernel/people/tomo/dm-snap/2008-11-26/ and 
ported it, so if you meanwhile made some other changes your the code, diff 
your changes against 2008-11-26 version and apply the diff by hand to the 
file that I release.

Mikulas




More information about the dm-devel mailing list