diff options
author | Yuri Pankov <yuri.pankov@nexenta.com> | 2013-03-06 17:57:09 -0800 |
---|---|---|
committer | Christopher Siden <chris.siden@delphix.com> | 2013-03-06 17:57:09 -0800 |
commit | efb4a871d8fd510a833bdca610528dde5ed69e42 (patch) | |
tree | f3fe1b499b2e1c2368d191938b025acd28422e13 /usr | |
parent | 41610d101ac089e52e33b0a671581e0c80d256c0 (diff) | |
download | illumos-gate-efb4a871d8fd510a833bdca610528dde5ed69e42.tar.gz |
3517 importing pool with autoreplace=on and "hole" vdevs crashes syseventd
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Jeffry Molanus <jeffry.molanus@nexenta.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/spa.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c b/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c index 3f0eea10e3..f05aeeabfa 100644 --- a/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c +++ b/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -518,7 +519,8 @@ zfs_deliver_check(nvlist_t *nvl) if (nvlist_lookup_uint64(nvl, ZFS_EV_POOL_GUID, &data.dd_pool_guid) != 0 || nvlist_lookup_uint64(nvl, ZFS_EV_VDEV_GUID, - &data.dd_vdev_guid) != 0) + &data.dd_vdev_guid) != 0 || + data.dd_vdev_guid == 0) return (0); data.dd_isdisk = B_TRUE; diff --git a/usr/src/uts/common/fs/zfs/spa.c b/usr/src/uts/common/fs/zfs/spa.c index 544a0407c1..004dfe9914 100644 --- a/usr/src/uts/common/fs/zfs/spa.c +++ b/usr/src/uts/common/fs/zfs/spa.c @@ -21,8 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -1556,7 +1556,8 @@ spa_check_removed(vdev_t *vd) for (int c = 0; c < vd->vdev_children; c++) spa_check_removed(vd->vdev_child[c]); - if (vd->vdev_ops->vdev_op_leaf && vdev_is_dead(vd)) { + if (vd->vdev_ops->vdev_op_leaf && vdev_is_dead(vd) && + !vd->vdev_ishole) { zfs_post_autoreplace(vd->vdev_spa, vd); spa_event_notify(vd->vdev_spa, vd, ESC_ZFS_VDEV_CHECK); } |