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

Configure Feed

Select the types of activity you want to include in your feed.

dm mpath: factor out multipath_queue_bio

Enables further cleanup.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>

+14 -12
+14 -12
drivers/md/dm-mpath.c
··· 574 574 * Map cloned bios (bio-based multipath) 575 575 */ 576 576 577 + static void multipath_queue_bio(struct multipath *m, struct bio *bio) 578 + { 579 + unsigned long flags; 580 + 581 + /* Queue for the daemon to resubmit */ 582 + spin_lock_irqsave(&m->lock, flags); 583 + bio_list_add(&m->queued_bios, bio); 584 + if (!test_bit(MPATHF_QUEUE_IO, &m->flags)) 585 + queue_work(kmultipathd, &m->process_queued_bios); 586 + spin_unlock_irqrestore(&m->lock, flags); 587 + } 588 + 577 589 static struct pgpath *__map_bio(struct multipath *m, struct bio *bio) 578 590 { 579 591 struct pgpath *pgpath; ··· 602 590 603 591 if ((pgpath && queue_io) || 604 592 (!pgpath && test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags))) { 605 - /* Queue for the daemon to resubmit */ 606 - spin_lock_irqsave(&m->lock, flags); 607 - bio_list_add(&m->queued_bios, bio); 608 - spin_unlock_irqrestore(&m->lock, flags); 593 + multipath_queue_bio(m, bio); 609 594 610 595 /* PG_INIT_REQUIRED cannot be set without QUEUE_IO */ 611 596 if (queue_io || test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) 612 597 pg_init_all_paths(m); 613 - else if (!queue_io) 614 - queue_work(kmultipathd, &m->process_queued_bios); 615 598 616 599 return ERR_PTR(-EAGAIN); 617 600 } ··· 1685 1678 spin_unlock_irqrestore(&m->lock, flags); 1686 1679 } 1687 1680 1688 - spin_lock_irqsave(&m->lock, flags); 1689 - bio_list_add(&m->queued_bios, clone); 1690 - if (!test_bit(MPATHF_QUEUE_IO, &m->flags)) 1691 - queue_work(kmultipathd, &m->process_queued_bios); 1692 - spin_unlock_irqrestore(&m->lock, flags); 1693 - 1681 + multipath_queue_bio(m, clone); 1694 1682 r = DM_ENDIO_INCOMPLETE; 1695 1683 done: 1696 1684 if (pgpath) {