summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
authorMike Snitzer2017-12-06 22:08:14 +0100
committerMike Snitzer2018-01-03 15:27:40 +0100
commit1836df0891423dcf2b68771e04b28e2208ee95f2 (patch)
treee88e76945d5d98a24fe4e8ca23945565be760ea4 /drivers/md/dm-mpath.c
parentdm mpath: optimize retrieval of bio_details from per-bio-data (diff)
downloadkernel-qcow2-linux-1836df0891423dcf2b68771e04b28e2208ee95f2.tar.gz
kernel-qcow2-linux-1836df0891423dcf2b68771e04b28e2208ee95f2.tar.xz
kernel-qcow2-linux-1836df0891423dcf2b68771e04b28e2208ee95f2.zip
dm mpath: move dm_bio_restore out of endio method
Moving the dm_bio_restore() to process_queued_bios() avoids doing that work in multipath_end_io_bio(). Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 40d721df11d3..45e9044d3bb5 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -639,7 +639,9 @@ static void process_queued_bios(struct work_struct *work)
blk_start_plug(&plug);
while ((bio = bio_list_pop(&bios))) {
- r = __multipath_map_bio(m, bio, get_mpio_from_bio(bio));
+ struct dm_mpath_io *mpio = get_mpio_from_bio(bio);
+ dm_bio_restore(get_bio_details_from_mpio(mpio), bio);
+ r = __multipath_map_bio(m, bio, mpio);
switch (r) {
case DM_MAPIO_KILL:
bio->bi_status = BLK_STS_IOERR;
@@ -1551,9 +1553,6 @@ static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone,
goto done;
}
- /* Queue for the daemon to resubmit */
- dm_bio_restore(get_bio_details_from_mpio(mpio), clone);
-
spin_lock_irqsave(&m->lock, flags);
bio_list_add(&m->queued_bios, clone);
spin_unlock_irqrestore(&m->lock, flags);