From: Oleg Drokin Subject: Re: [PATCH 1/2] [RFC] vfs: 'stat light' fstatat flags Date: Tue, 7 Apr 2009 14:24:20 -0400 Message-ID: <409BE74F-D341-4403-9900-57168ECBBD47@linuxhacker.ru> References: <20090407080046.GQ14571@wotan.suse.de> <20090407174229.GD31824@shareable.org> <1D2105EA-A7C8-46C8-8AB9-380F9FCA7730@linuxhacker.ru> <20090407181610.GH31824@shareable.org> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Cc: Mark Fasheh , linux-fsdevel@vger.kernel.org, Sage Weil , Trond Myklebust , Andreas Dilger To: Jamie Lokier Return-path: Received: from linuxhacker.ru ([217.76.32.60]:51340 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757543AbZDGSYx (ORCPT ); Tue, 7 Apr 2009 14:24:53 -0400 In-Reply-To: <20090407181610.GH31824@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello! On Apr 7, 2009, at 2:16 PM, Jamie Lokier wrote: > Oleg Drokin wrote: >>>> AT_STRICT allows userspace to indicate that it wants the most up to >>>> date >>>> version of a files status, regardless of performance impact. A >>>> distributed >>>> file system which has a non-coherent inode cache would know then to >>>> send a >>>> direct query to it's server. >>> Good idea! Sort out some NFS pain. >>> If a filesystem doesn't honour AT_STRICT, can we have the function >>> return an error instead of stale values? >> Supposedly the existing stat() is the way to do this? > I don't understand your response. If an application wants to be sure > it has non-stale attributes, how does stat() help? Are you saying > stat() does this? (Afaik it doesn't on NFS). 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? Bye, Oleg