Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2019 22:57:58 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r348208 - projects/fuse2/sys/fs/fuse
Message-ID:  <201905232257.x4NMvwfM014233@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Thu May 23 22:57:57 2019
New Revision: 348208
URL: https://svnweb.freebsd.org/changeset/base/348208

Log:
  fusefs: assume the mountpoint's generation is 0
  
  This seems to be libfuse's behavior (its documentation notwithstanding).
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/sys/fs/fuse/fuse_node.c

Modified: projects/fuse2/sys/fs/fuse/fuse_node.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_node.c	Thu May 23 22:49:03 2019	(r348207)
+++ projects/fuse2/sys/fs/fuse/fuse_node.c	Thu May 23 22:57:57 2019	(r348208)
@@ -263,7 +263,11 @@ fuse_vnode_get(struct mount *mp,
     enum vtype vtyp)
 {
 	struct thread *td = (cnp != NULL ? cnp->cn_thread : curthread);
-	uint64_t generation = feo ? feo->generation : 1;
+	/* 
+	 * feo should only be NULL for the root directory, which (when libfuse
+	 * is used) always has generation 0
+	 */
+	uint64_t generation = feo ? feo->generation : 0;
 	int err = 0;
 
 	err = fuse_vnode_alloc(mp, td, nodeid, vtyp, vpp);



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