diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-12-10 18:52:05 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-12-10 18:52:05 -0500 |
commit | c58098be979509a54021e837a47fcad08db31f94 (patch) | |
tree | 88ab7b21dbdac01756d0e835e3e9bc7a1bff7f28 /drivers/md | |
parent | 87968ddd2f3be1c21b932cac30157a83a1c4f935 (diff) |
dm raid1: remove bio_endio from dm_rh_mark_nosync
Move bio completion out of dm_rh_mark_nosync in preparation for the
next patch.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Takahiro Yasui <tyasui@redhat.com>
Tested-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-raid1.c | 3 | ||||
-rw-r--r-- | drivers/md/dm-region-hash.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index d1a7f1a4789c..4f466ad75680 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -779,7 +779,8 @@ static void do_failures(struct mirror_set *ms, struct bio_list *failures) | |||
779 | hold_bio(ms, bio); | 779 | hold_bio(ms, bio); |
780 | else { | 780 | else { |
781 | ms->in_sync = 0; | 781 | ms->in_sync = 0; |
782 | dm_rh_mark_nosync(ms->rh, bio, bio->bi_size, 0); | 782 | dm_rh_mark_nosync(ms->rh, bio); |
783 | bio_endio(bio, 0); | ||
783 | } | 784 | } |
784 | } | 785 | } |
785 | } | 786 | } |
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index 00806b760ccd..5f19ceb6fe91 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c | |||
@@ -383,8 +383,6 @@ static void complete_resync_work(struct dm_region *reg, int success) | |||
383 | /* dm_rh_mark_nosync | 383 | /* dm_rh_mark_nosync |
384 | * @ms | 384 | * @ms |
385 | * @bio | 385 | * @bio |
386 | * @done | ||
387 | * @error | ||
388 | * | 386 | * |
389 | * The bio was written on some mirror(s) but failed on other mirror(s). | 387 | * The bio was written on some mirror(s) but failed on other mirror(s). |
390 | * We can successfully endio the bio but should avoid the region being | 388 | * We can successfully endio the bio but should avoid the region being |
@@ -392,8 +390,7 @@ static void complete_resync_work(struct dm_region *reg, int success) | |||
392 | * | 390 | * |
393 | * This function is _not_ safe in interrupt context! | 391 | * This function is _not_ safe in interrupt context! |
394 | */ | 392 | */ |
395 | void dm_rh_mark_nosync(struct dm_region_hash *rh, | 393 | void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio) |
396 | struct bio *bio, unsigned done, int error) | ||
397 | { | 394 | { |
398 | unsigned long flags; | 395 | unsigned long flags; |
399 | struct dm_dirty_log *log = rh->log; | 396 | struct dm_dirty_log *log = rh->log; |
@@ -430,7 +427,6 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh, | |||
430 | BUG_ON(!list_empty(®->list)); | 427 | BUG_ON(!list_empty(®->list)); |
431 | spin_unlock_irqrestore(&rh->region_lock, flags); | 428 | spin_unlock_irqrestore(&rh->region_lock, flags); |
432 | 429 | ||
433 | bio_endio(bio, error); | ||
434 | if (recovering) | 430 | if (recovering) |
435 | complete_resync_work(reg, 0); | 431 | complete_resync_work(reg, 0); |
436 | } | 432 | } |