From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id qA8Gmw3e007373 for ; Thu, 8 Nov 2012 10:48:58 -0600 Message-ID: <509BE2E9.1070702@sgi.com> Date: Thu, 08 Nov 2012 10:50:49 -0600 From: Mark Tinguely MIME-Version: 1.0 Subject: Re: [PATCH 1/2] fiemap: add freespace mapping to FS_IOC_FIEMAP References: <1350537079-16246-1-git-send-email-david@fromorbit.com> <1350537079-16246-2-git-send-email-david@fromorbit.com> In-Reply-To: <1350537079-16246-2-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com On 10/18/12 00:11, Dave Chinner wrote: > From: Dave Chinner > > fiemap is used to map extents of used space on files. it's just an > array of extents, though, so there's no reason it can only index > *used* space. > > Ther eis need for getting freespace layout information into > userspace. For example, defragmentation programs would find it > useful to be able to map the free space in the filesystem to > work out where it is best to move data to defragment it. > Alternatively, knowing where free space is enables us to identify > extents that need to be moved to defragment free space. > > Hence, extend fiemap with the FIEMAP_FLAG_FREESPACE to indicate that > the caller wants to map free space in the range fm_start bytes from > the start of the filesystem for fm_length bytes. > > Because XFS can report extents in size order without needing to > sort, and this information is useful to xfs_fsr, also add > FIEMAP_FLAG_FREESPACE_SIZE to tell the filesystem to return a > freespace map ordered by extent size rather than offset. If there > are multiple extents of the same size, then they are ordered by > offset. > > Signed-off-by: Dave Chinner > --- ... > -------------- > diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h > index d830747..f4fbb9f 100644 > --- a/include/linux/fiemap.h > +++ b/include/linux/fiemap.h include/uabi/linux/fiemap.h ^^^^ other than that, it looks good. Reviewed-by: Mark Tinguely _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs