summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2015-04-15 20:16:31 +0000
committerrmacklem <rmacklem@FreeBSD.org>2015-04-15 20:16:31 +0000
commitad77d0b1c1c3c09a9bf76bebb397102d08ed35c6 (patch)
treebbc578ff440927019e13de747fa3256b9df8b2d7 /sys/ufs
parent98c2a4bca48582a25dbb01274fd65c9b8cd74058 (diff)
downloadFreeBSD-src-ad77d0b1c1c3c09a9bf76bebb397102d08ed35c6.zip
FreeBSD-src-ad77d0b1c1c3c09a9bf76bebb397102d08ed35c6.tar.gz
File systems that do not use the buffer cache (such as ZFS) must
use VOP_FSYNC() to perform the NFS server's Commit operation. This patch adds a mnt_kern_flag called MNTK_USES_BCACHE which is set by file systems that use the buffer cache. If this flag is not set, the NFS server always does a VOP_FSYNC(). This should be ok for old file system modules that do not set MNTK_USES_BCACHE, since calling VOP_FSYNC() is correct, although it might not be optimal for file systems that use the buffer cache. Reviewed by: kib MFC after: 2 weeks
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 6e2e556..88f952f 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1055,7 +1055,8 @@ ffs_mountfs(devvp, mp, td)
*/
MNT_ILOCK(mp);
mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED |
- MNTK_NO_IOPF | MNTK_UNMAPPED_BUFS | MNTK_SUSPENDABLE;
+ MNTK_NO_IOPF | MNTK_UNMAPPED_BUFS | MNTK_SUSPENDABLE |
+ MNTK_USES_BCACHE;
MNT_IUNLOCK(mp);
#ifdef UFS_EXTATTR
#ifdef UFS_EXTATTR_AUTOSTART
OpenPOWER on IntegriCloud