diff options
author | Heinz Mauelshagen <hjm@redhat.com> | 2008-04-24 16:43:19 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-04-25 08:26:44 -0400 |
commit | eb69aca5d3370b81450d68edeebc2bb9a3eb9689 (patch) | |
tree | ddb4c6d52e963b0898a892aaaee3228680e36449 /drivers/md/dm-raid1.c | |
parent | 22a1ceb1e6a7fbce95a1531ff10bb4fb036d4a37 (diff) |
dm kcopyd: clean interface
Clean up the kcopyd interface to prepare for publishing it in include/linux.
Signed-off-by: Heinz Mauelshagen <hjm@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r-- | drivers/md/dm-raid1.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 0d4e7e9653ff..32c7c6d10939 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -133,7 +133,7 @@ struct mirror_set { | |||
133 | struct dm_target *ti; | 133 | struct dm_target *ti; |
134 | struct list_head list; | 134 | struct list_head list; |
135 | struct region_hash rh; | 135 | struct region_hash rh; |
136 | struct kcopyd_client *kcopyd_client; | 136 | struct dm_kcopyd_client *kcopyd_client; |
137 | uint64_t features; | 137 | uint64_t features; |
138 | 138 | ||
139 | spinlock_t lock; /* protects the lists */ | 139 | spinlock_t lock; /* protects the lists */ |
@@ -788,7 +788,7 @@ static int recover(struct mirror_set *ms, struct region *reg) | |||
788 | { | 788 | { |
789 | int r; | 789 | int r; |
790 | unsigned int i; | 790 | unsigned int i; |
791 | struct dm_io_region from, to[KCOPYD_MAX_REGIONS], *dest; | 791 | struct dm_io_region from, to[DM_KCOPYD_MAX_REGIONS], *dest; |
792 | struct mirror *m; | 792 | struct mirror *m; |
793 | unsigned long flags = 0; | 793 | unsigned long flags = 0; |
794 | 794 | ||
@@ -820,9 +820,9 @@ static int recover(struct mirror_set *ms, struct region *reg) | |||
820 | } | 820 | } |
821 | 821 | ||
822 | /* hand to kcopyd */ | 822 | /* hand to kcopyd */ |
823 | set_bit(KCOPYD_IGNORE_ERROR, &flags); | 823 | set_bit(DM_KCOPYD_IGNORE_ERROR, &flags); |
824 | r = kcopyd_copy(ms->kcopyd_client, &from, ms->nr_mirrors - 1, to, flags, | 824 | r = dm_kcopyd_copy(ms->kcopyd_client, &from, ms->nr_mirrors - 1, to, |
825 | recovery_complete, reg); | 825 | flags, recovery_complete, reg); |
826 | 826 | ||
827 | return r; | 827 | return r; |
828 | } | 828 | } |
@@ -1504,7 +1504,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1504 | argc -= args_used; | 1504 | argc -= args_used; |
1505 | 1505 | ||
1506 | if (!argc || sscanf(argv[0], "%u", &nr_mirrors) != 1 || | 1506 | if (!argc || sscanf(argv[0], "%u", &nr_mirrors) != 1 || |
1507 | nr_mirrors < 2 || nr_mirrors > KCOPYD_MAX_REGIONS + 1) { | 1507 | nr_mirrors < 2 || nr_mirrors > DM_KCOPYD_MAX_REGIONS + 1) { |
1508 | ti->error = "Invalid number of mirrors"; | 1508 | ti->error = "Invalid number of mirrors"; |
1509 | dm_destroy_dirty_log(dl); | 1509 | dm_destroy_dirty_log(dl); |
1510 | return -EINVAL; | 1510 | return -EINVAL; |
@@ -1569,7 +1569,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1569 | goto err_destroy_wq; | 1569 | goto err_destroy_wq; |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); | 1572 | r = dm_kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); |
1573 | if (r) | 1573 | if (r) |
1574 | goto err_destroy_wq; | 1574 | goto err_destroy_wq; |
1575 | 1575 | ||
@@ -1588,7 +1588,7 @@ static void mirror_dtr(struct dm_target *ti) | |||
1588 | struct mirror_set *ms = (struct mirror_set *) ti->private; | 1588 | struct mirror_set *ms = (struct mirror_set *) ti->private; |
1589 | 1589 | ||
1590 | flush_workqueue(ms->kmirrord_wq); | 1590 | flush_workqueue(ms->kmirrord_wq); |
1591 | kcopyd_client_destroy(ms->kcopyd_client); | 1591 | dm_kcopyd_client_destroy(ms->kcopyd_client); |
1592 | destroy_workqueue(ms->kmirrord_wq); | 1592 | destroy_workqueue(ms->kmirrord_wq); |
1593 | free_context(ms, ti, ms->nr_mirrors); | 1593 | free_context(ms, ti, ms->nr_mirrors); |
1594 | } | 1594 | } |