dm snapshot: move cow ref from exception store to snap core
authorMike Snitzer <snitzer@redhat.com>
Thu, 10 Dec 2009 23:52:12 +0000 (23:52 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 10 Dec 2009 23:52:12 +0000 (23:52 +0000)
commitfc56f6fbcca3672c63c93c65f45105faacfc13cb
treef50f42a461ef33f8617fbdb781879e6ae77b62c4
parent985903bb3a6d98623360ab6c855417f638840029
dm snapshot: move cow ref from exception store to snap core

Store the reference to the snapshot cow device in the core snapshot
code instead of each exception store.  It can be accessed through the
new function dm_snap_cow().  Exception stores should each now maintain a
reference to their parent snapshot struct.

This is cleaner and makes part of the forthcoming snapshot merge code simpler.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-exception-store.c
drivers/md/dm-exception-store.h
drivers/md/dm-snap-persistent.c
drivers/md/dm-snap-transient.c
drivers/md/dm-snap.c