Support "sync=always" for ZVOLs.

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.
This commit is contained in:
Etienne Dechamps 2011-09-02 09:57:35 +02:00 committed by Brian Behlendorf
parent e67329d8e0
commit 56c34bac44

View File

@ -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);