diff options
| author | Mike Snitzer <snitzer@redhat.com> | 2016-08-04 19:16:04 -0400 |
|---|---|---|
| committer | Mike Snitzer <snitzer@redhat.com> | 2016-08-04 19:16:04 -0400 |
| commit | d50a6450104c237db1dc75314d17b78c990a8c05 (patch) | |
| tree | b2831319bcfb6662e854208f8b1b26c91f8844df | |
| parent | 2a034ec197aa574dd159961cc661c9b08cd76425 (diff) | |
| download | linux-dm-d50a6450104c237db1dc75314d17b78c990a8c05.tar.gz | |
dm mpath: fix potential for dropping queue_if_no_path due to multiple path failures
Notice: this object is not reachable from any branch.
If a multipath device is configured with the 'queue_if_no_path' feature
and it experiences multiple simultaneous path failures the 2nd
queue_if_no_path() call from multipath_presuspend() could cause the
previous MPATHF_QUEUE_IF_NO_PATH state (stored in
MPATHF_SAVED_QUEUE_IF_NO_PATH) to get dropped on the floor.
This could lead to spurious IO errors (e.g. -EIO) being returned up the
IO stack despite the queue_if_no_path feature being configured.
Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # < 4.7 would need a different backport
Notice: this object is not reachable from any branch.
| -rw-r--r-- | drivers/md/dm-mpath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index d7107d23b8976..fcfaef69a64fb 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -733,7 +733,8 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path, spin_lock_irqsave(&m->lock, flags); if (save_old_value) { - if (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) + if (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) || + test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags)) set_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags); else clear_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags); |
