From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: Attempt at "stat light" implementation Date: Tue, 7 Apr 2009 19:50:41 +0100 Message-ID: <20090407185041.GJ31824@shareable.org> References: <20090407062356.GA1336463@fiona.linuxhacker.ru> <20090407174921.GA24424@infradead.org> <1C8AF5C3-0509-43E2-BFC3-075DCCA49717@linuxhacker.ru> <20090407182809.GX3204@webber.adilger.int> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Oleg Drokin , Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Andreas Dilger Return-path: Received: from mail2.shareable.org ([80.68.89.115]:48632 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbZDGSu6 (ORCPT ); Tue, 7 Apr 2009 14:50:58 -0400 Content-Disposition: inline In-Reply-To: <20090407182809.GX3204@webber.adilger.int> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Andreas Dilger wrote: > Generally, any application doing tree traversal will have the parent > directory open doing readdir() or getdents() so I don't think that is > a huge problem. I can't think of any reason to disallow AT_FDCWD though. It's already there - are we proposing to take it away? :-) > > Also we still need an fstat light version anyway, don't we? > > Possibly, yes, though it isn't a strict requirement. The man page > reports that fstatat() is only for directories, but possibly it > could also be used on regular files? Suggestion: Passing AT_SELF (NULL) as the pathname means get the attributes of the fd argument itself, instead of doing a name lookup. -- Jamie