On Mon, Jul 25 2016 at  9:16pm -0400,
Mike Snitzer <[email protected]> wrote:
 
> Hi Bart,
> 
> Please try this patch to see if it fixes your issue, thanks.
> 
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 52baf8a..287caa7 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -433,10 +433,17 @@ failed:
>   */
>  static int must_push_back(struct multipath *m)
>  {
> -     return (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) ||
> -             ((test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) !=
> -               test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags)) &&
> -              dm_noflush_suspending(m->ti)));
> +     bool r;
> +     unsigned long flags;
> +
> +     spin_lock_irqsave(&m->lock, flags);
> +     r = (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) ||
> +          ((test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) !=
> +            test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags)) &&
> +           dm_noflush_suspending(m->ti)));
> +     spin_unlock_irqrestore(&m->lock, flags);
> +
> +     return r;
>  }
>  
>  /*

In addition to the above patch, please apply this patch and retest your
4.7 kernel:

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 287caa7..16583c1 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1416,12 +1416,14 @@ static void multipath_postsuspend(struct dm_target *ti)
 static void multipath_resume(struct dm_target *ti)
 {
        struct multipath *m = ti->private;
+       unsigned long flags;
 
+       spin_lock_irqsave(&m->lock, flags);
        if (test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags))
                set_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags);
        else
                clear_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags);
-       smp_mb__after_atomic();
+       spin_unlock_irqrestore(&m->lock, flags);
 }
 
 /*
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to