From: Jeff Garzik Subject: Re: [rfc] new stat*fs-like syscall? Date: Fri, 25 Jun 2010 00:33:35 -0400 Message-ID: <4C24319F.1030307@garzik.org> References: <20100624131455.GA10441@laptop> <20100625040156.GQ10441@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andreas Dilger , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Ulrich Drepper , Linus Torvalds To: Nick Piggin Return-path: In-Reply-To: <20100625040156.GQ10441@laptop> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 06/25/2010 12:01 AM, Nick Piggin wrote: > So is "frsize" supposed to be the optimal block size, or what? > f_bsize AFAIKS should be filesystem allocation block size because > apparently some programs require it to calculate size of file on > disk. > > If we can't change existing suboptimal legacy things, then let's > introduce new APIs that do the right thing. Apps that care will > eventually start using eg. a new syscall. > >> >>> - statvfs(2) lacks f_type. >>> >>> Is there anything more we should add here? Samba wants a capabilities >>> field, with things like sparse files, quotas, compression, encryption, >>> case preserving/sensitive. >> >> It wouldn't be a bad idea, but then you could get into issues of what exactly the above flags mean. That said, I think it is better to have broad categories of features that may be slightly ill-defined than having nothing at all. > > Yes it would be tricky. I don't want to add features that will just > be useless or go unused, but I don't want to change the syscall API > just to add f_flags, without looking at other possibilities. It would be nice to separate capabilities and fixed parameters (block size) from statistics which change frequently (free space). And are capabilities really suited to a C struct, at all? That seems more suited to a key/value type interface, a la NFSv4 attributes. Jeff