aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2009-01-05 22:05:17 -0500
committerAlasdair G Kergon <agk@redhat.com>2009-01-05 22:05:17 -0500
commit4db6bfe02bdc7dc5048f46dd682a94801d029adc (patch)
tree780a41560ea05266288853204f0d7e4eef4f6355 /drivers/md/dm-snap.c
parent1ae25f9c933d1432fbffdf3e126051a974608abf (diff)
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 'drivers/md/dm-snap.c')
-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)
1406{ 1406{
1407 int r; 1407 int r;
1408 1408
1409 r = dm_exception_store_init();
1410 if (r) {
1411 DMERR("Failed to initialize exception stores");
1412 return r;
1413 }
1414
1409 r = dm_register_target(&snapshot_target); 1415 r = dm_register_target(&snapshot_target);
1410 if (r) { 1416 if (r) {
1411 DMERR("snapshot target register failed %d", r); 1417 DMERR("snapshot target register failed %d", r);
@@ -1454,17 +1460,17 @@ static int __init dm_snapshot_init(void)
1454 1460
1455 return 0; 1461 return 0;
1456 1462
1457 bad_pending_pool: 1463bad_pending_pool:
1458 kmem_cache_destroy(tracked_chunk_cache); 1464 kmem_cache_destroy(tracked_chunk_cache);
1459 bad5: 1465bad5:
1460 kmem_cache_destroy(pending_cache); 1466 kmem_cache_destroy(pending_cache);
1461 bad4: 1467bad4:
1462 kmem_cache_destroy(exception_cache); 1468 kmem_cache_destroy(exception_cache);
1463 bad3: 1469bad3:
1464 exit_origin_hash(); 1470 exit_origin_hash();
1465 bad2: 1471bad2:
1466 dm_unregister_target(&origin_target); 1472 dm_unregister_target(&origin_target);
1467 bad1: 1473bad1:
1468 dm_unregister_target(&snapshot_target); 1474 dm_unregister_target(&snapshot_target);
1469 return r; 1475 return r;
1470} 1476}
@@ -1480,6 +1486,8 @@ static void __exit dm_snapshot_exit(void)
1480 kmem_cache_destroy(pending_cache); 1486 kmem_cache_destroy(pending_cache);
1481 kmem_cache_destroy(exception_cache); 1487 kmem_cache_destroy(exception_cache);
1482 kmem_cache_destroy(tracked_chunk_cache); 1488 kmem_cache_destroy(tracked_chunk_cache);
1489
1490 dm_exception_store_exit();
1483} 1491}
1484 1492
1485/* Module hooks */ 1493/* Module hooks */