summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Hartland <steven.hartland@multiplay.co.uk>2015-12-15 11:57:22 -0800
committerMatthew Ahrens <mahrens@delphix.com>2015-12-15 12:07:49 -0800
commitf693d300fbefaa2bd9a229a874b5994532a30d87 (patch)
treead6f52976dbf15a310b3dfc556b928e1977af848
parentb5254d6ec12a0443b3a431a7e656f38e4ac98b2e (diff)
downloadillumos-joyent-f693d300fbefaa2bd9a229a874b5994532a30d87.tar.gz
6494 ASSERT supported zio_types for file and disk vdevs
Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Albert Lee <trisk@omniti.com>
-rw-r--r--usr/src/uts/common/fs/zfs/vdev_disk.c2
-rw-r--r--usr/src/uts/common/fs/zfs/vdev_file.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_disk.c b/usr/src/uts/common/fs/zfs/vdev_disk.c
index ed4a8b773b..9ed59b232e 100644
--- a/usr/src/uts/common/fs/zfs/vdev_disk.c
+++ b/usr/src/uts/common/fs/zfs/vdev_disk.c
@@ -796,6 +796,8 @@ vdev_disk_io_start(zio_t *zio)
return;
}
+ ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE);
+
vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP);
vb->vb_io = zio;
diff --git a/usr/src/uts/common/fs/zfs/vdev_file.c b/usr/src/uts/common/fs/zfs/vdev_file.c
index 5dfc331d20..d5bad45f7f 100644
--- a/usr/src/uts/common/fs/zfs/vdev_file.c
+++ b/usr/src/uts/common/fs/zfs/vdev_file.c
@@ -211,6 +211,8 @@ vdev_file_io_start(zio_t *zio)
return;
}
+ ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE);
+
vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP);
vb->vb_io = zio;