diff options
-rw-r--r-- | module/zfs/zvol.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index cc0f1d1e0..5ca4f4670 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1008,6 +1008,16 @@ zvol_request(struct request_queue *q, struct bio *bio) zvol_write(zvr); } } else { + /* + * The SCST driver, and possibly others, may issue READ I/Os + * with a length of zero bytes. These empty I/Os contain no + * data and require no additional handling. + */ + if (size == 0) { + BIO_END_IO(bio, 0); + goto out; + } + zvr = kmem_alloc(sizeof (zv_request_t), KM_SLEEP); zvr->zv = zv; zvr->bio = bio; |