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;