path: root/drivers/md/dm-mpath.c
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-11 09:33:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-11 09:33:36 -0700
commit67b9d76f9e2f9f87f94a11521cc996dc2e43ce14 (patch)
tree6a2fda0dc7b24ea253c03e879e1c388dc6c6e87c /drivers/md/dm-mpath.c
parentc7c3ae2596d19ad0ed82f30d0e76a4b201b6b0a8 (diff)
parent7a7a3b45fed9a144dbf766ee842a4c5d0632b81d (diff)
Merge tag 'dm-3.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer: - Fix DM multipath IO hang regression from 3.15 due to logic bug in multipath_busy. This impacted cable-pull testing and also the ability to boot with IPR SCSI on a POWER8 box. - Fix possible deadlock with deferred device removal by using a new dedicated workqueue rather than using the system workqueue. - Fix NULL pointer crash due to race condition in dm-io's wake up code for sync_io by using a completion. - Update dm-crypt and dm-zero author name following legal name change; this is important to Jana so I didn't see any reason to hold it back. * tag 'dm-3.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm mpath: fix IO hang due to logic bug in multipath_busy dm io: fix a race condition in the wake up code for sync_io dm crypt, dm zero: update author name following legal name change dm: allocate a special workqueue for deferred device removal
Diffstat (limited to 'drivers/md/dm-mpath.c')
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 3f6fd9d33ba..f4167b013d9 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1611,8 +1611,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;