From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 20 01:07:13 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 068C337B401 for ; Fri, 20 Jun 2003 01:07:13 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7606F43FA3 for ; Fri, 20 Jun 2003 01:07:12 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9/8.12.9) with ESMTP id h5K870M7059110; Fri, 20 Jun 2003 01:07:05 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200306200807.h5K870M7059110@gw.catspoiler.org> Date: Fri, 20 Jun 2003 01:07:00 -0700 (PDT) From: Don Lewis To: uitm@blackflag.ru In-Reply-To: <200306200718.LAA00471@slt.oz> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-hackers@FreeBSD.org Subject: Re: open() and ESTALE error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2003 08:07:13 -0000 On 20 Jun, Andrey Alekseyev wrote: > In the normal situation, namecache entry+vnode+nfsnode+file handle may > stay cached for a really long time (until re-used? deleted or renamed > on the *client*). Expiring file handles (a new mechanism?) means much the > same to me as simply obtaining a new name cache entry+other data > on ESTALE :) I may be wrong, though. One case where there is a difference between timing out old file handles and just invalidating them on ESTALE: client% cmd1 > file1; cmd2 > file2 server% mv file1 tmpfile; mv file2 file1; mv tmpfile file1 wait an hour client% cat /dev/null > file1 If file handles are cached indefinitely, and the client didn't recycle the vnode for file1, which file on the server got truncated? Since neither file was deleted on the server, you can't rely on ESTALE to detect this situation. Question: does the timeout of the directory attributes cause open() do do an NFS lookup on the file, or does open() just find the vnode in the cache and use its cached handle?