From owner-cvs-src-old@FreeBSD.ORG Thu Jun 10 20:13:39 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B57F1065678 for ; Thu, 10 Jun 2010 20:13:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (unknown [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 79BCD8FC0C for ; Thu, 10 Jun 2010 20:13:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o5AKDdqE063274 for ; Thu, 10 Jun 2010 20:13:39 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o5AKDdcR063273 for cvs-src-old@freebsd.org; Thu, 10 Jun 2010 20:13:39 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <201006102013.o5AKDdcR063273@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Thu, 10 Jun 2010 20:13:23 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/nfsclient nfs_vnops.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 20:13:39 -0000 jhb 2010-06-10 20:13:23 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/nfsclient nfs_vnops.c Log: SVN rev 209005 on 2010-06-10 20:13:23Z by jhb MFC 208603: 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. Revision Changes Path 1.276.2.12 +19 -3 src/sys/nfsclient/nfs_vnops.c