diff options
author | ek110237 <none@none> | 2008-06-25 15:48:48 -0700 |
---|---|---|
committer | ek110237 <none@none> | 2008-06-25 15:48:48 -0700 |
commit | 8a79c1b573d7814f1e432b1de8c9ed00bc876bec (patch) | |
tree | 2d98469cdeec44991153eafa30263502b4d62ba8 /usr/src/uts/common/fs/zfs/vdev.c | |
parent | a99a4280495d0239dd393f52f6603a98ac7aac8b (diff) | |
download | illumos-gate-8a79c1b573d7814f1e432b1de8c9ed00bc876bec.tar.gz |
6700920 vdev_clear() needs some polishing
6719141 misspelling in status_callback() for I/O failure case
Diffstat (limited to 'usr/src/uts/common/fs/zfs/vdev.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c index ea4218a3fc..7d549f3508 100644 --- a/usr/src/uts/common/fs/zfs/vdev.c +++ b/usr/src/uts/common/fs/zfs/vdev.c @@ -1746,16 +1746,20 @@ vdev_clear(spa_t *spa, vdev_t *vd, boolean_t reopen_wanted) vdev_clear(spa, vd->vdev_child[c], reopen_wanted); /* - * If we're in the FAULTED state, then clear the persistent state and - * attempt to reopen the device. We also mark the vdev config dirty, so - * that the new faulted state is written out to disk. + * If we're in the FAULTED state or have experienced failed I/O, then + * clear the persistent state and attempt to reopen the device. We + * also mark the vdev config dirty, so that the new faulted state is + * written out to disk. */ - if (reopen_wanted && (vd->vdev_faulted || vd->vdev_degraded)) { + if (reopen_wanted && (vd->vdev_faulted || vd->vdev_degraded || + vd->vdev_stat.vs_aux == VDEV_AUX_IO_FAILURE)) { + boolean_t resilver = (vd->vdev_faulted || vd->vdev_degraded); + vd->vdev_faulted = vd->vdev_degraded = 0; vdev_reopen(vd); vdev_config_dirty(vd->vdev_top); - if (vd->vdev_faulted && vd->vdev_aux == NULL) + if (resilver && vd->vdev_aux == NULL && !vdev_is_dead(vd)) spa_async_request(spa, SPA_ASYNC_RESILVER); spa_event_notify(spa, vd, ESC_ZFS_VDEV_CLEAR); |