From 98b254188a730553361adfabca9f658421be2b82 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Mon, 20 Oct 2014 22:07:45 +0000 Subject: Illumos #5244 - zio pipeline callers should explicitly invoke next stage 5244 zio pipeline callers should explicitly invoke next stage Reviewed by: Adam Leventhal Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Reviewed by: Dan McDonald Reviewed by: Steven Hartland Approved by: Gordon Ross References: https://www.illumos.org/issues/5244 https://github.com/illumos/illumos-gate/commit/738f37b Porting Notes: 1. The unported "2932 support crash dumps to raidz, etc. pools" caused a merge conflict due to a copyright difference in module/zfs/vdev_raidz.c. 2. The unported "4128 disks in zpools never go away when pulled" and additional Linux-specific changes caused merge conflicts in module/zfs/vdev_disk.c. Ported-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #2828 --- module/zfs/vdev_disk.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'module/zfs/vdev_disk.c') diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index 7f2263457..db13b7bc4 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -657,7 +657,7 @@ vdev_disk_io_flush(struct block_device *bdev, zio_t *zio) return (0); } -static int +static void vdev_disk_io_start(zio_t *zio) { vdev_t *v = zio->io_vd; @@ -669,7 +669,8 @@ vdev_disk_io_start(zio_t *zio) if (!vdev_readable(v)) { zio->io_error = SET_ERROR(ENXIO); - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return; } switch (zio->io_cmd) { @@ -685,7 +686,7 @@ vdev_disk_io_start(zio_t *zio) error = vdev_disk_io_flush(vd->vd_bdev, zio); if (error == 0) - return (ZIO_PIPELINE_STOP); + return; zio->io_error = error; if (error == ENOTSUP) @@ -697,8 +698,8 @@ vdev_disk_io_start(zio_t *zio) zio->io_error = SET_ERROR(ENOTSUP); } - return (ZIO_PIPELINE_CONTINUE); - + zio_execute(zio); + return; case ZIO_TYPE_WRITE: flags = WRITE; break; @@ -709,17 +710,17 @@ vdev_disk_io_start(zio_t *zio) default: zio->io_error = SET_ERROR(ENOTSUP); - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return; } error = __vdev_disk_physio(vd->vd_bdev, zio, zio->io_data, zio->io_size, zio->io_offset, flags); if (error) { zio->io_error = error; - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return; } - - return (ZIO_PIPELINE_STOP); } static void -- cgit v1.2.3