summaryrefslogtreecommitdiff
path: root/usr/src/uts
diff options
context:
space:
mode:
authorHans Rosenfeld <rosenfeld@grumpf.hope-2000.org>2022-06-15 11:42:03 +0200
committerHans Rosenfeld <rosenfeld@grumpf.hope-2000.org>2022-06-24 17:23:06 +0200
commit29621f011bb9ea4f2d9ea887e971bbb3910ee931 (patch)
treecc737cda23b259c7145909a546a3b4e6dde6d181 /usr/src/uts
parentd515dd7754a14758624ee9b1330197cdb6a47c49 (diff)
downloadillumos-joyent-29621f011bb9ea4f2d9ea887e971bbb3910ee931.tar.gz
14745 ZFS should handle unknown/invalid vdev devids gracefully
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr/src/uts')
-rw-r--r--usr/src/uts/common/fs/zfs/vdev_disk.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_disk.c b/usr/src/uts/common/fs/zfs/vdev_disk.c
index ffbe1ede69..1cdc458974 100644
--- a/usr/src/uts/common/fs/zfs/vdev_disk.c
+++ b/usr/src/uts/common/fs/zfs/vdev_disk.c
@@ -24,6 +24,7 @@
* Copyright 2016 Nexenta Systems, Inc. All rights reserved.
* Copyright 2020 Joyent, Inc.
* Copyright 2020 Joshua M. Clulow <josh@sysmgr.org>
+ * Copyright 2022 Tintri by DDN, Inc. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -353,10 +354,11 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
if (vd->vdev_devid != NULL) {
if (ddi_devid_str_decode(vd->vdev_devid, &dvd->vd_devid,
&dvd->vd_minor) != 0) {
- vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
- vdev_dbgmsg(vd, "vdev_disk_open: invalid "
- "vdev_devid '%s'", vd->vdev_devid);
- return (SET_ERROR(EINVAL));
+ vdev_dbgmsg(vd,
+ "vdev_disk_open, invalid devid %s bypassed",
+ vd->vdev_devid);
+ spa_strfree(vd->vdev_devid);
+ vd->vdev_devid = NULL;
}
}