From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [RFC, PATCH 0/2] fiemap: filesystem free space mapping Date: Tue, 23 Oct 2012 08:30:44 -0400 Message-ID: <20121023123044.GG7341@infradead.org> References: <1350537079-16246-1-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com To: Dave Chinner Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:49348 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756299Ab2JWMao (ORCPT ); Tue, 23 Oct 2012 08:30:44 -0400 Content-Disposition: inline In-Reply-To: <1350537079-16246-1-git-send-email-david@fromorbit.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Oct 18, 2012 at 04:11:17PM +1100, Dave Chinner wrote: > So, I was bored a few days ago, and I was sick of having to run > xfs_db incorrectly report free space extents when the filesytem is > mounted, so I decided to extend fiemap to export freespace mappings > to userspace so I could get the information coherently through the > mounted filesystem. > > Yes, this could probably be considered interface abuse but, well, it > was simple to do because extent mapping is exactly what fiemap is > designed to do. Hence I didn't have to write new walkers/formatters > and I was using code I knew worked correctly. I think the right way to handle this is to introduce a new ioctl which uses the same structures. That way we have a reasonable interface, without issue like which file does it need to be called on because the VFS glue can turn it into a superblock op.