From: HC Date: Thu, 15 May 2014 00:58:11 +0000 (-0400) Subject: Honor zfs_nocacheflush for file vdevs X-Git-Tag: zfs-0.6.3~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9a1ac4d59c2a7b0d0065eccd1d68fcc32541f5b;p=zfs Honor zfs_nocacheflush for file vdevs For consistency with disk vdevs honor the zfs_nocacheflush tunable. This setting is available primarily for debugging and performance analysis. Signed-off-by: HC Signed-off-by: Brian Behlendorf Closes #2336 --- 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;