提交 c58098be 编写于 作者: M Mikulas Patocka 提交者: Alasdair G Kergon

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: NMikulas Patocka <mpatocka@redhat.com>
Reviewed-by: NTakahiro Yasui <tyasui@redhat.com>
Tested-by: NTakahiro Yasui <tyasui@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 87968ddd
...@@ -779,7 +779,8 @@ static void do_failures(struct mirror_set *ms, struct bio_list *failures) ...@@ -779,7 +779,8 @@ static void do_failures(struct mirror_set *ms, struct bio_list *failures)
hold_bio(ms, bio); hold_bio(ms, bio);
else { else {
ms->in_sync = 0; ms->in_sync = 0;
dm_rh_mark_nosync(ms->rh, bio, bio->bi_size, 0); dm_rh_mark_nosync(ms->rh, bio);
bio_endio(bio, 0);
} }
} }
} }
......
...@@ -383,8 +383,6 @@ static void complete_resync_work(struct dm_region *reg, int success) ...@@ -383,8 +383,6 @@ static void complete_resync_work(struct dm_region *reg, int success)
/* dm_rh_mark_nosync /* dm_rh_mark_nosync
* @ms * @ms
* @bio * @bio
* @done
* @error
* *
* The bio was written on some mirror(s) but failed on other mirror(s). * The bio was written on some mirror(s) but failed on other mirror(s).
* We can successfully endio the bio but should avoid the region being * 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,8 +390,7 @@ static void complete_resync_work(struct dm_region *reg, int success)
* *
* This function is _not_ safe in interrupt context! * This function is _not_ safe in interrupt context!
*/ */
void dm_rh_mark_nosync(struct dm_region_hash *rh, void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio)
struct bio *bio, unsigned done, int error)
{ {
unsigned long flags; unsigned long flags;
struct dm_dirty_log *log = rh->log; struct dm_dirty_log *log = rh->log;
...@@ -430,7 +427,6 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh, ...@@ -430,7 +427,6 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh,
BUG_ON(!list_empty(&reg->list)); BUG_ON(!list_empty(&reg->list));
spin_unlock_irqrestore(&rh->region_lock, flags); spin_unlock_irqrestore(&rh->region_lock, flags);
bio_endio(bio, error);
if (recovering) if (recovering)
complete_resync_work(reg, 0); complete_resync_work(reg, 0);
} }
......
...@@ -78,8 +78,7 @@ void dm_rh_dec(struct dm_region_hash *rh, region_t region); ...@@ -78,8 +78,7 @@ void dm_rh_dec(struct dm_region_hash *rh, region_t region);
/* Delay bios on regions. */ /* Delay bios on regions. */
void dm_rh_delay(struct dm_region_hash *rh, struct bio *bio); void dm_rh_delay(struct dm_region_hash *rh, struct bio *bio);
void dm_rh_mark_nosync(struct dm_region_hash *rh, void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio);
struct bio *bio, unsigned done, int error);
/* /*
* Region recovery control. * Region recovery control.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册