summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2009-01-06 04:05:17 +0100
committerAlasdair G Kergon <agk@redhat.com>2009-01-06 04:05:17 +0100
commit4db6bfe02bdc7dc5048f46dd682a94801d029adc (patch)
tree780a41560ea05266288853204f0d7e4eef4f6355 /drivers/md/dm-snap.c
parentdm snapshot: rename struct exception_store (diff)
downloadlinux-4db6bfe02bdc7dc5048f46dd682a94801d029adc.tar.xz
linux-4db6bfe02bdc7dc5048f46dd682a94801d029adc.zip
dm snapshot: split out exception store implementations
Move the existing snapshot exception store implementations out into separate files. Later patches will place these behind a new interface in preparation for alternative implementations. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/md/dm-snap.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 81f03a0e7838..018b567fc758 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1406,6 +1406,12 @@ static int __init dm_snapshot_init(void)
{
int r;
+ r = dm_exception_store_init();
+ if (r) {
+ DMERR("Failed to initialize exception stores");
+ return r;
+ }
+
r = dm_register_target(&snapshot_target);
if (r) {
DMERR("snapshot target register failed %d", r);
@@ -1454,17 +1460,17 @@ static int __init dm_snapshot_init(void)
return 0;
- bad_pending_pool:
+bad_pending_pool:
kmem_cache_destroy(tracked_chunk_cache);
- bad5:
+bad5:
kmem_cache_destroy(pending_cache);
- bad4:
+bad4:
kmem_cache_destroy(exception_cache);
- bad3:
+bad3:
exit_origin_hash();
- bad2:
+bad2:
dm_unregister_target(&origin_target);
- bad1:
+bad1:
dm_unregister_target(&snapshot_target);
return r;
}
@@ -1480,6 +1486,8 @@ static void __exit dm_snapshot_exit(void)
kmem_cache_destroy(pending_cache);
kmem_cache_destroy(exception_cache);
kmem_cache_destroy(tracked_chunk_cache);
+
+ dm_exception_store_exit();
}
/* Module hooks */