All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Junichi Nomura <j-nomura@ce.jp.nec.com>
Cc: device-mapper development <dm-devel@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>
Subject: Re: v3.15 dm-mpath regression: cable pull test causes I/O hang
Date: Tue, 08 Jul 2014 11:43:14 +0200	[thread overview]
Message-ID: <53BBBD32.7030404@acm.org> (raw)
In-Reply-To: <11AF7C027C4C02408624617A498607840132038A@BPXM12GP.gisp.nec.co.jp>

On 07/08/14 02:55, Junichi Nomura wrote:
> pg_ready() checks the current state of the multipath and may return
> false even if a new IO is needed to change the state.
> 
> OTOH, if multipath_busy() returns busy, a new IO will not be sent
> to multipath target and the state change won't happen. That results
> in lock up.
> 
> The intent of multipath_busy() is to avoid unnecessary cycles of
> dequeue + request_fn + requeue if it is known that multipath device
> will requeue.
> 
> Such situation would be:
>   - path group is being activated
>   - there is no path and the multipath is setup to requeue if no path
> 
> This patch should fix the problem introduced as a part of this commit:
>   commit e809917735ebf1b9a56c24e877ce0d320baee2ec
>   dm mpath: push back requests instead of queueing
> 
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index ebfa411..d58343e 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -1620,8 +1620,9 @@ static int multipath_busy(struct dm_target *ti)
>  
>  	spin_lock_irqsave(&m->lock, flags);
>  
> -	/* pg_init in progress, requeue until done */
> -	if (!pg_ready(m)) {
> +	/* pg_init in progress or no paths available */
> +	if (m->pg_init_in_progress ||
> +	    (!m->nr_valid_paths && m->queue_if_no_path)) {
>  		busy = 1;
>  		goto out;
>  	}
> 

This patch seems to fix the issue reported at the start of this thread -
with this patch applied my test passes.

Thanks !

Bart.

  reply	other threads:[~2014-07-08  9:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 13:02 v3.15 dm-mpath regression: cable pull test causes I/O hang Bart Van Assche
2014-06-27 13:33 ` Mike Snitzer
2014-06-27 14:18   ` Bart Van Assche
2014-07-02 22:02   ` Mike Snitzer
2014-07-03  5:43     ` Hannes Reinecke
2014-07-03 13:56     ` Bart Van Assche
2014-07-03 13:58       ` Hannes Reinecke
2014-07-03 14:05       ` Mike Snitzer
2014-07-03 14:15         ` Hannes Reinecke
2014-07-03 14:18           ` Mike Snitzer
2014-07-03 14:34         ` Bart Van Assche
2014-07-03 15:00           ` Mike Snitzer
2014-07-07 13:28             ` Bart Van Assche
2014-07-04  3:10           ` Junichi Nomura
2014-07-07 13:40             ` Bart Van Assche
2014-07-08  0:55               ` Junichi Nomura
2014-07-08  9:43                 ` Bart Van Assche [this message]
2014-07-08 16:33                 ` Mike Snitzer
2014-07-08 23:24                   ` Junichi Nomura

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BBBD32.7030404@acm.org \
    --to=bvanassche@acm.org \
    --cc=dm-devel@redhat.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.