diff options
author | Brian Behlendorf <[email protected]> | 2017-07-25 12:20:52 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2017-07-25 12:20:52 -0700 |
commit | 3f759c0c736d3a636614406ac0d6f9335819d6e9 (patch) | |
tree | 7e48cc533fbca37298f6cdbcb41f9c2b878a6421 | |
parent | f269060a24d1f43a30d647e0835ca4fcaac6bae9 (diff) |
Fix 'zpool clear' on suspended pools
'zpool clear' should be able to resume I/O on suspended, but otherwise
healthy, pools.
4a283c7 accidentally introduced a new code path where we call
txg_wait_synced() on the suspended pool before we had the chance to
resume I/O via zio_resume(): this results in the 'zpool clear'
command hanging indefinitely, waiting for a TXG that cannot be synced.
Fix this by avoiding the call to txg_wait_synced().
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #6399
-rw-r--r-- | module/zfs/zfs_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index b2f5db584..d195eded7 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -4946,7 +4946,8 @@ zfs_ioc_clear(zfs_cmd_t *zc) vdev_clear(spa, vd); - (void) spa_vdev_state_exit(spa, spa->spa_root_vdev, 0); + (void) spa_vdev_state_exit(spa, spa_suspended(spa) ? + NULL : spa->spa_root_vdev, 0); /* * Resume any suspended I/Os. |