kern/86319: support a "noac" NFS mount flag to turn off the attribute cache

Erez Zadok ezk at am-utils.org
Sun Sep 18 21:30:04 PDT 2005


>Number:         86319
>Category:       kern
>Synopsis:       support a "noac" NFS mount flag to turn off the attribute cache
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 19 04:30:03 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Erez Zadok
>Release:        5.4 and 6.0
>Organization:
Stony Brook University
>Environment:
All versions of freebsd up to and including 6.0.
>Description:
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.

>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list