diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2015-04-30 12:39:24 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2015-04-30 12:39:24 +0000 |
commit | fba63dddeb47d7daf52036b191fc27d0b34cb02b (patch) | |
tree | 2eddb41071be4a6cf55f2041a43ee90ffc63440a /sys/fs/ext2fs/ext2_vfsops.c | |
parent | 64b7754f6bf764fc7c4f921916e19418075e80e9 (diff) | |
download | FreeBSD-src-fba63dddeb47d7daf52036b191fc27d0b34cb02b.zip FreeBSD-src-fba63dddeb47d7daf52036b191fc27d0b34cb02b.tar.gz |
MFC: r281562
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.
Diffstat (limited to 'sys/fs/ext2fs/ext2_vfsops.c')
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index d55bc56..ce943ea 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -661,7 +661,8 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp) * Initialize filesystem stat information in mount struct. */ MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED | + MNTK_USES_BCACHE; MNT_IUNLOCK(mp); return (0); out: |