Displaying 1 result from an estimated 1 matches for "dmu_tx_creat".
Did you mean:
dmu_tx_create
2007 Aug 23
1
EOF broken on zvol raw devices?
...- 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);
uint64_t off = uio->uio_loffset;
-
- dmu_tx_t *tx = dmu_tx_create(zv->zv_objset);
+ dmu_tx_t *tx;
+
+ if (bytes > volsize - off) /* don''t write past the end */
+ bytes = volsize - off;
+
+ tx = dmu_tx_create(zv->zv_objset);
dmu_tx_hold_write(tx, ZVOL_OBJ, off,...