Bug 235773 - [FUSEFS]: Missing real support for attr/dentry cache timeouts
Summary: [FUSEFS]: Missing real support for attr/dentry cache timeouts
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Alan Somers
URL:
Keywords:
Depends on: 235774 230258
Blocks: 236136
  Show dependency treegraph
 
Reported: 2019-02-16 00:35 UTC by Conrad Meyer
Modified: 2019-04-19 22:33 UTC (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer 2019-02-16 00:35:24 UTC
In r344183 and r344184 we added basic support for cache timeouts (zero vs non-zero), but still need to implement real timeouts.

+++ This bug was initially created as a clone of Bug #230258 +++
Comment 1 Conrad Meyer freebsd_committer 2019-02-16 00:36:11 UTC
I'll likely take this if no one beats me to it.
Comment 2 commit-hook freebsd_committer 2019-03-01 23:53:37 UTC
A commit references this bug:

Author: asomers
Date: Fri Mar  1 23:53:07 UTC 2019
New revision: 344715
URL: https://svnweb.freebsd.org/changeset/base/344715

Log:
  Begin a fuse(4) test suite

  It only tests the kernel portion of fuse, not the userspace portion (which
  comes from sysutils/fusefs-libs).  The kernel-userspace interface is
  de-facto standardized, and this test suite seeks to validate FreeBSD's
  implementation.

  It uses GoogleMock to substitute for a userspace daemon and validate the
  kernel's behavior in response to filesystem access.  GoogleMock is
  convenient because it can validate the order, number, and arguments of each
  operation, and return canned responses.

  But that also means that the test suite must use GoogleTest, since
  GoogleMock is incompatible with atf-c++ and atf.test.mk does not allow C++
  programs to use atf-c.

  This commit adds the first 10 test cases out of an estimated 130 total.

  PR:		235775, 235773
  Sponsored by:	The FreeBSD Foundation

Changes:
  projects/fuse2/etc/mtree/BSD.tests.dist
  projects/fuse2/tests/sys/fs/Makefile
  projects/fuse2/tests/sys/fs/fuse/
  projects/fuse2/tests/sys/fs/fuse/Makefile
  projects/fuse2/tests/sys/fs/fuse/getattr.cc
  projects/fuse2/tests/sys/fs/fuse/lookup.cc
  projects/fuse2/tests/sys/fs/fuse/mockfs.cc
  projects/fuse2/tests/sys/fs/fuse/mockfs.hh
  projects/fuse2/tests/sys/fs/fuse/utils.cc
  projects/fuse2/tests/sys/fs/fuse/utils.hh
Comment 3 commit-hook freebsd_committer 2019-04-09 00:48:30 UTC
A commit references this bug:

Author: asomers
Date: Tue Apr  9 00:47:40 UTC 2019
New revision: 346046
URL: https://svnweb.freebsd.org/changeset/base/346046

Log:
  fusefs: implement attribute cache timeouts

  The FUSE protocol allows the server to specify the timeout period for the
  client's attribute and entry caches.  This commit implements the timeout
  period for the attribute cache.  The entry cache's timeout period is
  currently disabled because it panics, and is guarded by the
  vfs.fusefs.lookup_cache_expire sysctl.

  PR:		235773
  Reported by:	cem
  Sponsored by:	The FreeBSD Foundation

Changes:
  projects/fuse2/sys/fs/fuse/fuse_internal.c
  projects/fuse2/sys/fs/fuse/fuse_internal.h
  projects/fuse2/sys/fs/fuse/fuse_node.c
  projects/fuse2/sys/fs/fuse/fuse_node.h
  projects/fuse2/sys/fs/fuse/fuse_vnops.c
  projects/fuse2/tests/sys/fs/fusefs/getattr.cc
  projects/fuse2/tests/sys/fs/fusefs/lookup.cc
Comment 4 commit-hook freebsd_committer 2019-04-09 17:23:56 UTC
A commit references this bug:

Author: asomers
Date: Tue Apr  9 17:23:35 UTC 2019
New revision: 346060
URL: https://svnweb.freebsd.org/changeset/base/346060

Log:
  fusefs: implement entry cache timeouts

  Follow-up to r346046.  These two commits implement fuse cache timeouts for
  both entries and attributes.  They also remove the vfs.fusefs.lookup_cache
  enable sysctl, which is no longer needed now that cache timeouts are
  honored.

  PR:		235773
  Sponsored by:	The FreeBSD Foundation

Changes:
  projects/fuse2/sys/fs/fuse/fuse_internal.h
  projects/fuse2/sys/fs/fuse/fuse_node.c
  projects/fuse2/sys/fs/fuse/fuse_vnops.c
  projects/fuse2/tests/sys/fs/fusefs/lookup.cc
Comment 5 Alan Somers freebsd_committer 2019-04-19 22:33:37 UTC
This is complete on the fuse2 branch.