Displaying 1 result from an estimated 1 matches for "uio_loffset".
Did you mean:
bio_offset
2007 Aug 23
1
EOF broken on zvol raw devices?
...state_t *zv;
+ uint64_t volsize;
rl_t *rl;
int error = 0;
@@ -914,10 +915,16 @@ zvol_read(dev_t dev, uio_t *uio, cred_t
if (zv == NULL)
return (ENXIO);
+ volsize = zv->zv_volsize;
+
rl = zfs_range_lock(&zv->zv_znode, uio->uio_loffset, uio->uio_resid,
RL_READER);
- while (uio->uio_resid > 0) {
+ while (uio->uio_resid > 0 && uio->uio_loffset < volsize) {
uint64_t bytes = MIN(uio->uio_resid, DMU_MAX_ACCESS >> 1);
+
+ /* don''t read...