Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2019 22:25:39 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r348315 - projects/fuse2/sys/fs/fuse
Message-ID:  <201905272225.x4RMPdvq061513@repo.freebsd.org>

index | next in thread | raw e-mail

Author: asomers
Date: Mon May 27 22:25:39 2019
New Revision: 348315
URL: https://svnweb.freebsd.org/changeset/base/348315

Log:
  fusefs: clear fuse_getattr_in.getattr_flags
  
  Protocol 7.9 adds this field.  We could use it to store the file handle of
  the file whose attributes we're requesting.  However, that requires extra
  work at runtime to look up a file handle, and I'm not aware of any file
  systems that care.  So it's easiest just to clear it.
  
  Sponsored by:	The FreeBSD Foundation

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

Modified: projects/fuse2/sys/fs/fuse/fuse_internal.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_internal.c	Mon May 27 21:51:43 2019	(r348314)
+++ projects/fuse2/sys/fs/fuse/fuse_internal.c	Mon May 27 22:25:39 2019	(r348315)
@@ -680,12 +680,21 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt
 {
 	struct fuse_dispatcher fdi;
 	struct fuse_vnode_data *fvdat = VTOFUD(vp);
+	struct fuse_getattr_in *fgai;
 	struct fuse_attr_out *fao;
 	off_t old_filesize = fvdat->cached_attrs.va_size;
 	enum vtype vtyp;
 	int err;
 
 	fdisp_init(&fdi, 0);
+	fdisp_make_vp(&fdi, FUSE_GETATTR, vp, td, cred);
+	fgai = fdi.indata;
+	/* 
+	 * We could look up a file handle and set it in fgai->fh, but that
+	 * involves extra runtime work and I'm unaware of any file systems that
+	 * care.
+	 */
+	fgai->getattr_flags = 0;
 	if ((err = fdisp_simple_putget_vp(&fdi, FUSE_GETATTR, vp, td, cred))) {
 		if (err == ENOENT)
 			fuse_internal_vnode_disappear(vp);


help

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