View | Details | Raw Unified | Return to bug 222288 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c (-7 / +18 lines)
Lines 988-994 vdev_geom_io_intr(struct bio *bp) Link Here
988
		}
988
		}
989
		break;
989
		break;
990
	}
990
	}
991
991
992
	/*
993
	 * We have to split bio freeing into two parts, because the ABD code
994
	 * cannot be called in this context and vdev_op_io_done is not called
995
	 * for ZIO_TYPE_IOCTL zio-s.
996
	 */
997
	if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) {
998
		g_destroy_bio(bp);
999
		zio->io_bio = NULL;
1000
	}
992
	zio_delay_interrupt(zio);
1001
	zio_delay_interrupt(zio);
993
}
1002
}
994
1003
Lines 1090-1110 vdev_geom_io_done(zio_t *zio) Link Here
1090
{
1099
{
1091
	struct bio *bp = zio->io_bio;
1100
	struct bio *bp = zio->io_bio;
1092
1101
1102
	if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) {
1103
		ASSERT(bp == NULL);
1104
		return;
1105
	}
1106
1093
	if (bp == NULL) {
1107
	if (bp == NULL) {
1094
		ASSERT3S(zio->io_error, !=, 0);
1108
		ASSERT3S(zio->io_error, ==, ENXIO);
1095
		IMPLY(zio->io_type == ZIO_TYPE_READ ||
1096
		    zio->io_type == ZIO_TYPE_WRITE,
1097
		    zio->io_error == ENXIO);
1098
		return;
1109
		return;
1099
	}
1110
	}
1100
1111
1101
	if (zio->io_type == ZIO_TYPE_READ) {
1112
	if (zio->io_type == ZIO_TYPE_READ)
1102
		abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size);
1113
		abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size);
1103
	} else if (zio->io_type == ZIO_TYPE_WRITE) {
1114
	else
1104
		abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size);
1115
		abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size);
1105
	}
1106
1116
1107
	g_destroy_bio(bp);
1117
	g_destroy_bio(bp);
1118
	zio->io_bio = NULL;
1108
}
1119
}
1109
1120
1110
static void
1121
static void

Return to bug 222288