Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 20:13:03 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/nfsclient nfs_vnops.c
Message-ID:  <201006102013.o5AKDCHI063211@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2010-06-10 20:13:03 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/nfsclient        nfs_vnops.c 
  Log:
  SVN rev 209003 on 2010-06-10 20:13:03Z by jhb
  
  MFC 208603,208605:
  More gracefully handle stale file handles and attributes when opening a
  file via NFS.  Specifically, to satisfy close-to-open-consistency, the NFS
  client always performs at least one RPC on a file during an open(2) to see
  if the file has changed.  Normally this RPC is an ACCESS or GETATTR RPC
  that is forced by flushing a file's attribute cache during nfs_open() and
  then requesting new attributes.  However, if the file is noticed to be
  stale during nfs_open(), the only recourse is to fail the open(2) call
  with ESTALE.  On the other hand, if the ACCESS or GETATTR RPC is sent
  during nfs_lookup(), then the NFS client can fall back to a LOOKUP RPC to
  obtain the new file handle in the case that a file has been replaced.
  
  This change causes the NFS client to flush the attribute cache during
  nfs_lookup() when validating a name cache hit if the attributes fetched
  during nfs_lookup() can be reused in nfs_open().  This allows the client
  to open a replaced file via the new file handle the first time that it
  notices a replaced file rather than failing with ESTALE in some cases.
  
  Approved by:    re (kib)
  
  Revision   Changes    Path
  1.318.2.9  +20 -3     src/sys/nfsclient/nfs_vnops.c



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