Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mikulas Patocka and committed by
Alasdair G Kergon
c58098be 87968ddd

+4 -8
+2 -1
drivers/md/dm-raid1.c
··· 779 779 hold_bio(ms, bio); 780 780 else { 781 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 }
+1 -5
drivers/md/dm-region-hash.c
··· 383 383 /* dm_rh_mark_nosync 384 384 * @ms 385 385 * @bio 386 - * @done 387 - * @error 388 386 * 389 387 * The bio was written on some mirror(s) but failed on other mirror(s). 390 388 * We can successfully endio the bio but should avoid the region being ··· 390 392 * 391 393 * This function is _not_ safe in interrupt context! 392 394 */ 393 - void dm_rh_mark_nosync(struct dm_region_hash *rh, 394 - struct bio *bio, unsigned done, int error) 395 + void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio) 395 396 { 396 397 unsigned long flags; 397 398 struct dm_dirty_log *log = rh->log; ··· 427 430 BUG_ON(!list_empty(&reg->list)); 428 431 spin_unlock_irqrestore(&rh->region_lock, flags); 429 432 430 - bio_endio(bio, error); 431 433 if (recovering) 432 434 complete_resync_work(reg, 0); 433 435 }
+1 -2
include/linux/dm-region-hash.h
··· 78 78 /* Delay bios on regions. */ 79 79 void dm_rh_delay(struct dm_region_hash *rh, struct bio *bio); 80 80 81 - void dm_rh_mark_nosync(struct dm_region_hash *rh, 82 - struct bio *bio, unsigned done, int error); 81 + void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio); 83 82 84 83 /* 85 84 * Region recovery control.