aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2019-11-21 14:05:15 +0000
committerAndriy Gapon <avg@FreeBSD.org>2019-11-21 14:05:15 +0000
commitca5d9ec3f2de3a93c31bb3ba121c9456d93a6ad1 (patch)
tree1ef227f0754ec99a9eaf5adf9b25ce4a85c1774a
parent253adf1e4e4778f0eb999353bf8df1d5550b5ee5 (diff)
downloadsrc-ca5d9ec3f2de3a93c31bb3ba121c9456d93a6ad1.tar.gz
src-ca5d9ec3f2de3a93c31bb3ba121c9456d93a6ad1.zip
11056 vdev_disk_io_start will panic the system if ldi_strategy returns an error.
illumos/illumos-gate@fa88c70fa54c01be933cc49fd271e5c4468f7eb8 https://github.com/illumos/illumos-gate/commit/fa88c70fa54c01be933cc49fd271e5c4468f7eb8 https://www.illumos.org/issues/11056 Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=354959
-rw-r--r--uts/common/fs/zfs/vdev_disk.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/uts/common/fs/zfs/vdev_disk.c b/uts/common/fs/zfs/vdev_disk.c
index 3f137c5d59c5..f7e0b3652451 100644
--- a/uts/common/fs/zfs/vdev_disk.c
+++ b/uts/common/fs/zfs/vdev_disk.c
@@ -22,7 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
* Copyright 2016 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2013 Joyent, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/zfs_context.h>
@@ -857,8 +857,15 @@ vdev_disk_io_start(zio_t *zio)
bp->b_bufsize = zio->io_size;
bp->b_iodone = vdev_disk_io_intr;
- /* ldi_strategy() will return non-zero only on programming errors */
- VERIFY(ldi_strategy(dvd->vd_lh, bp) == 0);
+ /*
+ * In general we would expect ldi_strategy() to return non-zero only
+ * because of programming errors, but we've also seen this fail shortly
+ * after a disk dies.
+ */
+ if (ldi_strategy(dvd->vd_lh, bp) != 0) {
+ zio->io_error = ENXIO;
+ zio_interrupt(zio);
+ }
}
static void