From: Etienne Dechamps Date: Fri, 2 Sep 2011 07:57:35 +0000 (+0200) Subject: Support "sync=always" for ZVOLs. X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;h=56c34bac44d47898809c46db3e5444511bbe0ef6;p=zfs.git 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. --- diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index a25fbbe..9dda040 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);