From 56c34bac44d47898809c46db3e5444511bbe0ef6 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Fri, 2 Sep 2011 09:57:35 +0200 Subject: [PATCH] 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 Fixes #374. --- module/zfs/zvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index a25fbbe5e565..9dda04077e7d 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -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);