svn commit: r317394 - stable/11/sys/fs/fuse

Mark Johnston markj at FreeBSD.org
Tue Apr 25 00:00:35 UTC 2017


Author: markj
Date: Tue Apr 25 00:00:34 2017
New Revision: 317394
URL: https://svnweb.freebsd.org/changeset/base/317394

Log:
  MFC r317273 (by cem):
  fuse: Implement FOPEN_KEEP_CACHE flag

Modified:
  stable/11/sys/fs/fuse/fuse_node.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/fuse/fuse_node.c
==============================================================================
--- stable/11/sys/fs/fuse/fuse_node.c	Mon Apr 24 23:47:12 2017	(r317393)
+++ stable/11/sys/fs/fuse/fuse_node.c	Tue Apr 25 00:00:34 2017	(r317394)
@@ -272,8 +272,6 @@ fuse_vnode_open(struct vnode *vp, int32_
 	/*
 	 * Funcation is called for every vnode open.
 	 * Merge fuse_open_flags it may be 0
-	 *
-	 * XXXIP: Handle FOPEN_KEEP_CACHE
 	 */
 	/*
 	 * Ideally speaking, direct io should be enabled on
@@ -293,6 +291,8 @@ fuse_vnode_open(struct vnode *vp, int32_
 		VTOFUD(vp)->flag |= FN_DIRECTIO;
 		fuse_io_invalbuf(vp, td);
 	} else {
+		if ((fuse_open_flags & FOPEN_KEEP_CACHE) == 0)
+			fuse_io_invalbuf(vp, td);
 	        VTOFUD(vp)->flag &= ~FN_DIRECTIO;
 	}
 


More information about the svn-src-all mailing list