diff options
author | Jun'ichi Nomura <j-nomura@ce.jp.nec.com> | 2014-07-08 00:55:14 +0000 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-07-10 16:44:15 -0400 |
commit | 7a7a3b45fed9a144dbf766ee842a4c5d0632b81d (patch) | |
tree | b26ddd6cfc60b5f45a0925680dc6f19a54af7411 /sound/i2c | |
parent | 10f1d5d111e8aed46a0f1179faf9a3cf422f689e (diff) | |
download | op-kernel-dev-7a7a3b45fed9a144dbf766ee842a4c5d0632b81d.zip op-kernel-dev-7a7a3b45fed9a144dbf766ee842a4c5d0632b81d.tar.gz |
dm mpath: fix IO hang due to logic bug in multipath_busy
Commit e80991773 ("dm mpath: push back requests instead of queueing")
modified multipath_busy() to return true if !pg_ready(). pg_ready()
checks the current state of the multipath device and may return false
even if a new IO is needed to change the state.
Bart Van Assche reported that he had multipath IO lockup when he was
performing cable pull tests. Analysis showed that the multipath
device had a single path group with both paths active, but that the
path group itself was not active. During the multipath device state
transitions 'queue_io' got set but nothing could clear it. Clearing
'queue_io' only happens in __choose_pgpath(), but it won't be called
if multipath_busy() returns true due to pg_ready() returning false
when 'queue_io' is set.
As such the !pg_ready() check in multipath_busy() is wrong because new
IO will not be sent to multipath target and the multipath state change
won't happen. That results in multipath IO lockup.
The intent of multipath_busy() is to avoid unnecessary cycles of
dequeue + request_fn + requeue if it is known that the multipath
device will requeue.
Such "busy" situations would be:
- path group is being activated
- there is no path and the multipath is setup to requeue if no path
Fix multipath_busy() to return "busy" early only for these specific
situations.
Reported-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # v3.15
Diffstat (limited to 'sound/i2c')
0 files changed, 0 insertions, 0 deletions