From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Chow Subject: Re: Problems of lookup_revalidate Date: Tue, 27 Aug 2002 09:35:12 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3D6AD750.2070602@shaolinmicro.com> References: <3D6A4EF2.1070607@shaolinmicro.com> <200208261810.37180.trond.myklebust@fys.uio.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: To: Trond Myklebust List-Id: linux-fsdevel.vger.kernel.org Trond Myklebust wrote: >On Monday 26 August 2002 17:53, David Chow wrote: > > >>Trond, >> >>I think the strategy used in 2.4.19 for NFS dentry and inode updates are >>too weak. May be you have being pushing too hard on optimizing >>performance (fewer lookups and revalidate). But I have problems that the >>client d_cache() inconsistency. It seems when the server changes file >>mode or ownership, the client is not updated properly unless I explicity >>add a file in the parent directory at the server which triggers the >>mtime of the parent, the client hardly update the dcache and inode >>parameters properly. Please clarify if my guess is wrong. Thanks. >> >> > >I don't see what you mean here. Attributes are indeed cached: see the >'actimeo' and 'noac' mount options. If you mess around with those attributes >on the server, and then call 'stat()' then you will indeed get wrong results. >So what? >There is *no* guarantee that you can use to ensure that attributes are always >correct on the client. That's part of the protocol. > >Most (if not all) NFS clients therefore use attribute caching, and assume that >they only have to check the attributes when the cache times out *or* when >open() is called on the file. > >Cheers, > Trond > > Even I cat the file, the file seems still using the old cache on the client, but the server version has changed. Any possibilities? The mtime and size of the file at the server HAS changed so why not nfs client refresh_inode() on openning the file? David