]> granicus.if.org Git - zfs/commitdiff
Honor zfs_nocacheflush for file vdevs
authorHC <mmttdebbcc@yahoo.com>
Thu, 15 May 2014 00:58:11 +0000 (20:58 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 19 May 2014 20:30:48 +0000 (13:30 -0700)
For consistency with disk vdevs honor the zfs_nocacheflush tunable.
This setting is available primarily for debugging and performance
analysis.

Signed-off-by: HC <mmttdebbcc@yahoo.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2336

module/zfs/vdev_file.c

index 3305802241d7c63ebba0baba792551009643c244..8059cdea4400b57d2da8ece842046d30c4b63fa3 100644 (file)
@@ -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;