dm log: move dirty region log code into separate module

Move the dirty region log code into a separate module so
other targets can share the code.

Signed-off-by: Heinz Mauelshagen <hjm@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
Heinz Mauelshagen
2008-04-24 21:43:09 +01:00
committed by Alasdair G Kergon
parent b7fd54a70f
commit 769aef30f0
3 changed files with 11 additions and 12 deletions

View File

@@ -1862,15 +1862,9 @@ static int __init dm_mirror_init(void)
{
int r;
r = dm_dirty_log_init();
if (r)
return r;
r = dm_register_target(&mirror_target);
if (r < 0) {
if (r < 0)
DMERR("Failed to register mirror target");
dm_dirty_log_exit();
}
return r;
}
@@ -1882,8 +1876,6 @@ static void __exit dm_mirror_exit(void)
r = dm_unregister_target(&mirror_target);
if (r < 0)
DMERR("unregister failed %d", r);
dm_dirty_log_exit();
}
/* Module hooks */