Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2017 00:00:34 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r317394 - stable/11/sys/fs/fuse
Message-ID:  <201704250000.v3P00YKI044665@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704250000.v3P00YKI044665>