Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2005 16:29:53 GMT
From:      Cyril Vechera <cv-c@fluid.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/78673: nfs client open resets attrstamp ever if fs is mounted readonly
Message-ID:  <200503101629.j2AGTrFo020389@www.freebsd.org>
Resent-Message-ID: <200503101630.j2AGU9hi067427@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         78673
>Category:       kern
>Synopsis:       nfs client open resets attrstamp ever if fs is mounted readonly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 10 16:30:08 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Cyril Vechera
>Release:        5-STABLE
>Organization:
Net Ltd.
>Environment:
FreeBSD cv.ws.local 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #1: Thu Mar 10 13:32:50 UTC 2005     root@compiler.incru.net:/usr/src/sys/i386/compile/OFFICIER  i386
>Description:
NFS client resets the timestamp of a cached attributes on each open call. When the file system is mounted read only it couses unnecessary request to the NFS server to get fresh access attributes.

>How-To-Repeat:
      
>Fix:
patch attached:
*** /usr/src/sys/nfsclient/nfs_vnops.c.orig    Thu Mar 10 22:23:03 2005
--- /usr/src/sys/nfsclient/nfs_vnops.c Thu Mar 10 00:33:51 2005
***************
*** 463,469 ****
                        np->n_mtime = vattr.va_mtime.tv_sec;
                }
        }
!       np->n_attrstamp = 0; /* For Open/Close consistency */
        return (0);
  }

--- 463,470 ----
                        np->n_mtime = vattr.va_mtime.tv_sec;
                }
        }
!       if (!(vp->v_mount->mnt_flag & MNT_RDONLY))
!               np->n_attrstamp = 0; /* For Open/Close consistency */
        return (0);
  }


>Release-Note:
>Audit-Trail:
>Unformatted:



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