Skip to content

Commit

Permalink
Support "sync=always" for ZVOLs.
Browse files Browse the repository at this point in the history
Currently the "sync=always" property works for regular ZFS datasets, but not
for ZVOLs. This patch remedies that.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Fixes #374.
  • Loading branch information
dechamps authored and behlendorf committed Feb 8, 2012
1 parent e67329d commit 56c34ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ zvol_write(void *arg)
dmu_tx_commit(tx);
zfs_range_unlock(rl);

if (rq_is_sync(req))
if (rq_is_sync(req) || zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zv->zv_zilog, ZVOL_OBJ);

blk_end_request(req, -error, size);
Expand Down

0 comments on commit 56c34ba

Please sign in to comment.