summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McDonald <danmcd@mnx.io>2022-06-24 11:41:48 -0400
committerDan McDonald <danmcd@mnx.io>2022-06-24 11:41:48 -0400
commit20a435cc6693ed9f1feb1360a26bdf89ab00f8be (patch)
tree8e4e6b1757636c638ea0c27cfd86b82fbd2801e2
parent35774c0514711f164f324c3f7cae19cf6b79e874 (diff)
parent29621f011bb9ea4f2d9ea887e971bbb3910ee931 (diff)
downloadillumos-joyent-20a435cc6693ed9f1feb1360a26bdf89ab00f8be.tar.gz
[illumos-gate merge]
commit 29621f011bb9ea4f2d9ea887e971bbb3910ee931 14745 ZFS should handle unknown/invalid vdev devids gracefully
-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 4be567d551..a114e260b4 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>
@@ -356,10 +357,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;
}
}