summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/zfs/vdev_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/vdev_file.c b/module/zfs/vdev_file.c
index 330580224..8059cdea4 100644
--- a/module/zfs/vdev_file.c
+++ b/module/zfs/vdev_file.c
@@ -176,6 +176,10 @@ vdev_file_io_start(zio_t *zio)
switch (zio->io_cmd) {
case DKIOCFLUSHWRITECACHE:
+
+ if (zfs_nocacheflush)
+ break;
+
zio->io_error = VOP_FSYNC(vf->vf_vnode, FSYNC | FDSYNC,
kcred, NULL);
break;