Bug 86319 - [nfs] [request] support a "noac" NFS mount flag to turn off the attribute cache
Summary: [nfs] [request] support a "noac" NFS mount flag to turn off the attribute cache
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Edward Tomasz Napierala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-19 05:30 UTC by Erez Zadok
Modified: 2014-12-21 11:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erez Zadok 2005-09-19 05:30:03 UTC
To turn off the NFS attribute cache in FreeBSD, one has to set the
following four flags to zero in struct nfs_args:

nfs_args->acregmin = 0;
nfs_args->acregmax = 0;
nfs_args->acdirmin = 0;
nfs_args->acdirmax = 0;

In addition, you have to turn on four flags to tell the kernel that you
indeed want it to use your values for the above four flags:

nfs_args->flags |= \
  (NFSMNT_ACREGMIN|NFSMNT_ACREGMAX|NFSMNT_ACDIRMIN|NFSMNT_ACDIRMAX);

This is rather cumbersome and also confusing because some users may be
used to what other OSs do: just setting the four fields suffices.  For
that reason, some OSs like Solaris provide a convenience flag called
"noac" that can be set to simply turn off the attribute cache entirely.

I would like to ask that FreeBSD support such a convenience flag "noac".  

In addition, please document this flag and the current behaviour of how
one turns off the attribute cache, in the mount_nfs man page.
Comment 1 cel freebsd_committer freebsd_triage 2006-05-10 19:19:54 UTC
Responsible Changed
From-To: freebsd-bugs->cel

cel is taking an NFS client feature request.
Comment 2 cel freebsd_committer freebsd_triage 2007-03-12 15:24:22 UTC
Responsible Changed
From-To: cel->freebsd-bugs

Back to the public pool.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2008-01-28 09:11:46 UTC
State Changed
From-To: open->suspended

Mark suspended awaiting patches.
Comment 4 Edward Tomasz Napierala freebsd_committer freebsd_triage 2014-12-21 11:38:02 UTC
Committed to 11-HEAD as r273849 and in 10-STABLE as r275249.