diff options
author | George Wilson <George.Wilson@Sun.COM> | 2010-02-22 14:27:33 -0800 |
---|---|---|
committer | George Wilson <George.Wilson@Sun.COM> | 2010-02-22 14:27:33 -0800 |
commit | 24cc0e1c125df7098c4418c91f0e2364e6b7a29f (patch) | |
tree | d998dae720de3ad5156629f0997fc3714001e881 /usr | |
parent | 5614b00a387e7956a34ceeb55880937a1601755f (diff) | |
download | illumos-gate-24cc0e1c125df7098c4418c91f0e2364e6b7a29f.tar.gz |
6923572 cannot dump to zvol when spa_config_lock is held as writer
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/uts/common/fs/zfs/zvol.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/zvol.c b/usr/src/uts/common/fs/zfs/zvol.c index 2b4a0b2bdb..bd3dddda41 100644 --- a/usr/src/uts/common/fs/zfs/zvol.c +++ b/usr/src/uts/common/fs/zfs/zvol.c @@ -1111,11 +1111,17 @@ zvol_dumpio(zvol_state_t *zv, void *addr, uint64_t offset, uint64_t size, offset -= ze->ze_nblks * zv->zv_volblocksize; ze = list_next(&zv->zv_extents, ze); } - spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); + + if (!ddi_in_panic()) + spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); + vd = vdev_lookup_top(spa, DVA_GET_VDEV(&ze->ze_dva)); offset += DVA_GET_OFFSET(&ze->ze_dva); error = zvol_dumpio_vdev(vd, addr, offset, size, doread, isdump); - spa_config_exit(spa, SCL_STATE, FTAG); + + if (!ddi_in_panic()) + spa_config_exit(spa, SCL_STATE, FTAG); + return (error); } |