diff options
author | HC <[email protected]> | 2014-05-14 20:58:11 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-05-19 13:30:48 -0700 |
commit | f9a1ac4d59c2a7b0d0065eccd1d68fcc32541f5b (patch) | |
tree | bd741740ce725fe8b53f1be1b567bfe95d1c7f61 /module | |
parent | 83021b47c2870c0ba948cbcfe08f41bd7730f5fb (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2336
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/vdev_file.c | 4 |
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; |