From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: Re: [PATCH 1/2] [RFC] vfs: 'stat light' fstatat flags Date: Tue, 07 Apr 2009 13:37:22 -0700 Message-ID: <1239136642.5664.9.camel@heimdal.trondhjem.org> References: <20090407080046.GQ14571@wotan.suse.de> <20090407174229.GD31824@shareable.org> <1D2105EA-A7C8-46C8-8AB9-380F9FCA7730@linuxhacker.ru> <20090407181610.GH31824@shareable.org> <409BE74F-D341-4403-9900-57168ECBBD47@linuxhacker.ru> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Jamie Lokier , Mark Fasheh , linux-fsdevel@vger.kernel.org, Sage Weil , Andreas Dilger To: Oleg Drokin Return-path: Received: from mx2.netapp.com ([216.240.18.37]:17394 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758718AbZDGUhn (ORCPT ); Tue, 7 Apr 2009 16:37:43 -0400 In-Reply-To: <409BE74F-D341-4403-9900-57168ECBBD47@linuxhacker.ru> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 2009-04-07 at 14:24 -0400, Oleg Drokin wrote: > Well, what the stat actually meant to do is "give me the file > information > as it is now". By the time it returns, the data is stale anyway, and the > longer your path from the user app to the actual file storage, the > more potentially out of date the information is. > NFS just takes it to an extreme case and introduces an assumed validity > timeout. > While I do not directly oppose such a flag, I really do not see huge > value > in it. I wonder what is the specific usecase do you have in mind? The default behaviour of stat() on NFS is to do a revalidation of the cached data (by which I mean that we issue an RPC call if and only if the cache has timed out, or if it is known to be invalid). The AT_STRICT would be used by the application to tell NFS that it must retrieve the cached data from the server. One instance where this is useful would be the case where you're doing a distributed compile: the application knows that the file may have changed on the server, and wants to force the kernel to check mtime. Cheers Trond -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@netapp.com www.netapp.com