Displaying 1 result from an estimated 1 matches for "zv_objset".
2007 Aug 23
1
EOF broken on zvol raw devices?
...uint64_t bytes = MIN(uio->uio_resid, DMU_MAX_ACCESS >> 1);
+
+ /* don''t read past the end */
+ if (bytes > volsize - uio->uio_loffset)
+ bytes = volsize - uio->uio_loffset;
error = dmu_read_uio(zv->zv_objset, ZVOL_OBJ, uio, bytes);
if (error)
@@ -933,6 +940,7 @@ zvol_write(dev_t dev, uio_t *uio, cred_t
{
minor_t minor = getminor(dev);
zvol_state_t *zv;
+ uint64_t volsize;
rl_t *rl;
int error = 0;
@@ -943,13 +951,19 @@ zvol_write(dev_t dev, uio_t...