Skip to content

Commit

Permalink
- Backport openzfs#10184 zvol_write() can use dmu_tx_hold_write_by_dn…
Browse files Browse the repository at this point in the history
…ode()
  • Loading branch information
tle211212 committed May 19, 2020
1 parent 024f03d commit 4ce5000
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,8 @@ zvol_write(void *arg)
if (bytes > volsize - off) /* don't write past the end */
bytes = volsize - off;

dmu_tx_hold_write(tx, ZVOL_OBJ, off, bytes);
dmu_tx_hold_write_by_dnode(tx, zv->zv_dn, off, bytes);


/* This will only fail for ENOSPC */
error = dmu_tx_assign(tx, TXG_WAIT);
Expand Down

0 comments on commit 4ce5000

Please sign in to comment.