|
@@ -391,13 +391,16 @@ static int map_io(struct multipath *m, struct request *clone,
|
|
|
if (was_queued)
|
|
|
m->queue_size--;
|
|
|
|
|
|
- if ((pgpath && m->queue_io) ||
|
|
|
- (!pgpath && m->queue_if_no_path)) {
|
|
|
+ if (m->pg_init_required) {
|
|
|
+ if (!m->pg_init_in_progress)
|
|
|
+ queue_work(kmultipathd, &m->process_queued_ios);
|
|
|
+ r = DM_MAPIO_REQUEUE;
|
|
|
+ } else if ((pgpath && m->queue_io) ||
|
|
|
+ (!pgpath && m->queue_if_no_path)) {
|
|
|
/* Queue for the daemon to resubmit */
|
|
|
list_add_tail(&clone->queuelist, &m->queued_ios);
|
|
|
m->queue_size++;
|
|
|
- if ((m->pg_init_required && !m->pg_init_in_progress) ||
|
|
|
- !m->queue_io)
|
|
|
+ if (!m->queue_io)
|
|
|
queue_work(kmultipathd, &m->process_queued_ios);
|
|
|
pgpath = NULL;
|
|
|
r = DM_MAPIO_SUBMITTED;
|
|
@@ -1677,6 +1680,11 @@ static int multipath_busy(struct dm_target *ti)
|
|
|
|
|
|
spin_lock_irqsave(&m->lock, flags);
|
|
|
|
|
|
+ /* pg_init in progress, requeue until done */
|
|
|
+ if (m->pg_init_in_progress) {
|
|
|
+ busy = 1;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
/* Guess which priority_group will be used at next mapping time */
|
|
|
if (unlikely(!m->current_pgpath && m->next_pg))
|
|
|
pg = m->next_pg;
|