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.
dmu_tx_commit(tx);
zfs_range_unlock(rl);
dmu_tx_commit(tx);
zfs_range_unlock(rl);
+ 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);
zil_commit(zv->zv_zilog, ZVOL_OBJ);
blk_end_request(req, -error, size);