Bug 235775 - [FUSE]: Reuse cached attributes, when available and valid
Summary: [FUSE]: Reuse cached attributes, when available and valid
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs mailing list
URL:
Keywords:
Depends on: 230258
Blocks: 236136
  Show dependency treegraph
 
Reported: 2019-02-16 00:51 UTC by Conrad Meyer
Modified: 2019-03-04 22:08 UTC (History)
7 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:51:39 UTC
When cached attributes are valid, save a round-trip through FUSE and return the cached values in VOP_GETATTR.

(Ditto: use cache_enter and keep lookup dentries cached.)

This is a performance optimization rather than a correctness issue.

+++ This bug was initially created as a clone of Bug #230258 +++
Comment 1 commit-hook freebsd_committer 2019-03-01 23:53:33 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 2 commit-hook freebsd_committer 2019-03-04 22:08:31 UTC
A commit references this bug:

Author: asomers
Date: Mon Mar  4 22:07:34 UTC 2019
New revision: 344785
URL: https://svnweb.freebsd.org/changeset/base/344785

Log:
  fuse(4): add tests for CREATE, OPEN, READLINK, SETATTR and SYMLINK

  The new SETATTR tests deal with already-open files.

  PR:		235775
  PR:		236231
  Sponsored by:	The FreeBSD Foundation

Changes:
  projects/fuse2/tests/sys/fs/fuse/Makefile
  projects/fuse2/tests/sys/fs/fuse/create.cc
  projects/fuse2/tests/sys/fs/fuse/mockfs.hh
  projects/fuse2/tests/sys/fs/fuse/open.cc
  projects/fuse2/tests/sys/fs/fuse/readlink.cc
  projects/fuse2/tests/sys/fs/fuse/setattr.cc
  projects/fuse2/tests/sys/fs/fuse/symlink.cc