diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-05-17 21:10:42 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-05-21 15:25:23 +0000 |
commit | 3a1da6de2a216503918b00b0a4524e613a8134d8 (patch) | |
tree | 740799f22dc42a8f788e3efef78fe9fec3cfd491 /usr | |
parent | 84af6eface8c46fc41fa613c296cde40e03d557b (diff) | |
download | illumos-joyent-3a1da6de2a216503918b00b0a4524e613a8134d8.tar.gz |
OS-7797 vdev_disk_io_start will panic the system if ldi_strategy returns an error.
Reviewed by: Kody Kantor <kody.kantor@joyent.com>
Approved by: Kody Kantor <kody.kantor@joyent.com>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_disk.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_disk.c b/usr/src/uts/common/fs/zfs/vdev_disk.c index 320d7a9d0d..8c12595811 100644 --- a/usr/src/uts/common/fs/zfs/vdev_disk.c +++ b/usr/src/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> @@ -868,8 +868,15 @@ vdev_disk_io_start(zio_t *zio) zfs_zone_zio_start(zio); - /* 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 |