From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: Attempt at "stat light" implementation Date: Tue, 7 Apr 2009 13:49:21 -0400 Message-ID: <20090407174921.GA24424@infradead.org> References: <20090407062356.GA1336463@fiona.linuxhacker.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Oleg Drokin Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:37290 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756752AbZDGRtW (ORCPT ); Tue, 7 Apr 2009 13:49:22 -0400 Content-Disposition: inline In-Reply-To: <20090407062356.GA1336463@fiona.linuxhacker.ru> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Apr 07, 2009 at 10:23:56AM +0400, Oleg Drokin wrote: > Hello! > > I quickly realized that perhaps we can use just one extra syscall for fstat, and stat/lstat could be > implemented as statat with just current cwd, though I do not know how desirable that is. > > Also I though that it would be kind of useful to allow the bitmask to be compatible with existing statat > flags usage so that we do not need a new statat. I think the best way to do it is to just define additional flags for the *statat family, that if present only request partial stat information. > Also perhaps the ->getattr just needs a prototype change to accept the flags argument and if the FS cares > about it - to use it, but I did not want to do this huge patch touching every FS right now if only to save > my time should this approach to be determined as undesirable for one reason or another, so > for now I add a ->getattr_light Yes, no additional method please. Adding the mask argument to getattr is a pretty trivial search and replace.