Brian Behlendorf cc9c6bcb73 Fix vdev_probe() call outside SCL_STATE_ALL lock
When an IO fails then zio_vdev_io_done() can call vdev_probe()
to determine the health of the vdev.  This is safe as long as
the original zio was submitted with zio_wait() and holds the
SCL_STATE_ALL lock over the operation.

If zio_no_wait() was used then the done callback will submit
the probe IO outside the SCL_STATE_ALL lock and hit this
ASSERT in zio_create()

  ASSERT(!vd || spa_config_held(spa, SCL_STATE_ALL, RW_READER));

Resolve the issue by only allowing vdev_probe() to be called
when there's a waiter indicating the caller is using zio_wait().
This assumes that caller is still holding SCL_STATE_ALL.

This issue isn't MMP specific but was surfaced when testing.
Without this patch it can be reproduced by running:

  zpool set multihost on <pool>
  zinject -d <vdev> -e io -T write -f 50 <pool> -L uber

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@intel.com>
Closes #745
Closes #6279
2017-07-13 13:54:10 -04:00
..
2017-05-02 10:06:18 -07:00
2015-01-16 14:41:26 -08:00
2017-05-26 11:42:10 -07:00
2017-06-26 14:36:49 -07:00
2015-01-16 14:41:26 -08:00
2016-11-02 12:14:45 -07:00
2017-06-29 10:18:03 -07:00
2017-07-13 13:54:00 -04:00
2016-12-12 10:46:26 -08:00
2015-01-16 14:41:26 -08:00
2017-07-13 13:54:00 -04:00
2017-07-13 13:54:00 -04:00
2016-04-21 09:49:25 -07:00
2017-01-03 11:31:18 -06:00
2010-08-31 13:41:58 -07:00
2017-07-13 13:54:00 -04:00
2017-07-13 13:54:00 -04:00
2017-07-13 13:54:00 -04:00
2017-07-13 13:54:00 -04:00
2017-07-13 13:54:00 -04:00
2017-07-13 13:54:00 -04:00
2017-06-27 10:09:16 -07:00
2016-11-29 14:34:33 -08:00
2017-05-04 19:26:28 -04:00
2017-05-04 19:26:28 -04:00
2017-03-10 09:51:33 -08:00
2010-08-31 13:41:58 -07:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:33 -08:00
2017-07-13 13:54:00 -04:00
2017-03-10 09:51:33 -08:00
2017-01-03 11:31:18 -06:00
2017-03-10 09:51:33 -08:00
2017-03-29 12:24:51 -07:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:41 -08:00
2017-01-23 10:35:58 -08:00
2017-07-12 13:05:37 -07:00