From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Dilger Subject: Re: Attempt at "stat light" implementation Date: Tue, 07 Apr 2009 11:28:09 -0700 Message-ID: <20090407182809.GX3204@webber.adilger.int> References: <20090407062356.GA1336463@fiona.linuxhacker.ru> <20090407174921.GA24424@infradead.org> <1C8AF5C3-0509-43E2-BFC3-075DCCA49717@linuxhacker.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Oleg Drokin Return-path: Received: from sca-es-mail-2.Sun.COM ([192.18.43.133]:49589 "EHLO sca-es-mail-2.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758241AbZDGS2V (ORCPT ); Tue, 7 Apr 2009 14:28:21 -0400 Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n37ISHC4004928 for ; Tue, 7 Apr 2009 11:28:17 -0700 (PDT) Content-disposition: inline Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java(tm) System Messaging Server 7.0-5.01 64bit (built Feb 19 2009)) id <0KHQ00G00RDJS500@fe-sfbay-10.sun.com> for linux-fsdevel@vger.kernel.org; Tue, 07 Apr 2009 11:28:17 -0700 (PDT) In-reply-to: <1C8AF5C3-0509-43E2-BFC3-075DCCA49717@linuxhacker.ru> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Apr 07, 2009 13:56 -0400, Oleg Drokin wrote: > On Apr 7, 2009, at 1:49 PM, Christoph Hellwig wrote: >> I think the best way to do it is to just define additional flags for >> *statat family, that if present only request partial stat information. > > But having to open every dir (or take an extra intermediate lookup hit) > might be a bad thing at times unless we officially allow to use a > "magic" > "AT_FDCWD". What's your opinion on this? 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. > 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? Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.