From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ric Wheeler Subject: Re: [patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP Date: Thu, 01 Nov 2007 10:51:07 -0400 Message-ID: <4729E7DB.8040300@emc.com> References: <20071025230758.945535769@crlf.corp.google.com> <20071029190813.GB7742@ucw.cz> Reply-To: ric@emc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mike Waychison , linux-fsdevel , Linux Kernel To: Pavel Machek Return-path: Received: from mexforward.lss.emc.com ([128.222.32.20]:32628 "EHLO mexforward.lss.emc.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754413AbXKAOv3 (ORCPT ); Thu, 1 Nov 2007 10:51:29 -0400 In-Reply-To: <20071029190813.GB7742@ucw.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Pavel Machek wrote: > Hi! > >> Remove the need for having CAP_SYS_RAWIO when doing a FIBMAP call on an open file descriptor. >> >> It would be nice to allow users to have permission to see where their data is landing on disk, and there really isn't a good reason to keep them from getting at this information. > > I believe it is to prevent users from intentionally creating extremely > fragmented files... > > You can read 60MB in a second, but fragmented 60MB file could take > 10msec * 60MB/4KB = 150 seconds. That's factor 150 slowdown... > > ...but I agree that SYS_RAWIO may be wrong capability to cover this. > > Pavel I don't see how restricting FIBMAP use helps prevent fragmentation since FIBMAP just allows you to see what damage was already done. You can create nicely fragmented files simply by having multiple threads writing concurrently to one or more files in the same directory (depending on the file system, allocation policy, etc). ric