Support "sync=always" for ZVOLs.
[zfs.git] / module / zfs / zvol.c
index 61e22b8..9dda040 100644 (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);
@@ -1350,8 +1350,8 @@ zvol_fini(void)
        list_destroy(&zvol_state_list);
 }
 
-module_param(zvol_major, uint, 0);
+module_param(zvol_major, uint, 0444);
 MODULE_PARM_DESC(zvol_major, "Major number for zvol device");
 
-module_param(zvol_threads, uint, 0);
+module_param(zvol_threads, uint, 0444);
 MODULE_PARM_DESC(zvol_threads, "Number of threads for zvol device");