diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-08-02 07:32:02 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 07:32:02 -0400 |
commit | 4622afb3f50e03ce6da42002e7ed3675dfafc187 (patch) | |
tree | 6143b3a7a3963c693cd018886ff51e10113c8805 /drivers/md/dm-kcopyd.c | |
parent | e29e65aacbd9e628378084905cbcf62a9fa4a8cc (diff) |
dm kcopyd: remove offset field from job structure
The offset field in struct kcopyd_job is always zero so remove it.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-kcopyd.c')
-rw-r--r-- | drivers/md/dm-kcopyd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c index 320401dec104..e7926fa1eef2 100644 --- a/drivers/md/dm-kcopyd.c +++ b/drivers/md/dm-kcopyd.c | |||
@@ -224,7 +224,6 @@ struct kcopyd_job { | |||
224 | unsigned int num_dests; | 224 | unsigned int num_dests; |
225 | struct dm_io_region dests[DM_KCOPYD_MAX_REGIONS]; | 225 | struct dm_io_region dests[DM_KCOPYD_MAX_REGIONS]; |
226 | 226 | ||
227 | sector_t offset; | ||
228 | unsigned int nr_pages; | 227 | unsigned int nr_pages; |
229 | struct page_list *pages; | 228 | struct page_list *pages; |
230 | 229 | ||
@@ -380,7 +379,7 @@ static int run_io_job(struct kcopyd_job *job) | |||
380 | .bi_rw = job->rw, | 379 | .bi_rw = job->rw, |
381 | .mem.type = DM_IO_PAGE_LIST, | 380 | .mem.type = DM_IO_PAGE_LIST, |
382 | .mem.ptr.pl = job->pages, | 381 | .mem.ptr.pl = job->pages, |
383 | .mem.offset = job->offset, | 382 | .mem.offset = 0, |
384 | .notify.fn = complete_io, | 383 | .notify.fn = complete_io, |
385 | .notify.context = job, | 384 | .notify.context = job, |
386 | .client = job->kc->io_client, | 385 | .client = job->kc->io_client, |
@@ -398,8 +397,7 @@ static int run_pages_job(struct kcopyd_job *job) | |||
398 | { | 397 | { |
399 | int r; | 398 | int r; |
400 | 399 | ||
401 | job->nr_pages = dm_div_up(job->dests[0].count + job->offset, | 400 | job->nr_pages = dm_div_up(job->dests[0].count, PAGE_SIZE >> 9); |
402 | PAGE_SIZE >> 9); | ||
403 | r = kcopyd_get_pages(job->kc, job->nr_pages, &job->pages); | 401 | r = kcopyd_get_pages(job->kc, job->nr_pages, &job->pages); |
404 | if (!r) { | 402 | if (!r) { |
405 | /* this job is ready for io */ | 403 | /* this job is ready for io */ |
@@ -602,7 +600,6 @@ int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from, | |||
602 | job->num_dests = num_dests; | 600 | job->num_dests = num_dests; |
603 | memcpy(&job->dests, dests, sizeof(*dests) * num_dests); | 601 | memcpy(&job->dests, dests, sizeof(*dests) * num_dests); |
604 | 602 | ||
605 | job->offset = 0; | ||
606 | job->nr_pages = 0; | 603 | job->nr_pages = 0; |
607 | job->pages = NULL; | 604 | job->pages = NULL; |
608 | 605 | ||