Thread (17 messages) 17 messages, 7 authors, 2012-11-08

Re: [RFC, PATCH 0/2] fiemap: filesystem free space mapping

From: Chris Mason <hidden>
Date: 2012-10-24 11:47:21
Also in: linux-fsdevel

On Tue, Oct 23, 2012 at 03:53:13PM -0600, Dave Chinner wrote:
On Tue, Oct 23, 2012 at 08:30:44AM -0400, Christoph Hellwig wrote:
quoted
On Thu, Oct 18, 2012 at 04:11:17PM +1100, Dave Chinner wrote:
quoted
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.
A VFS level ioctl or an XFS ioctl?

I thought about a new ioctl, but then what's the point of having an
extensible fiemap interface if we create new ioctls with an
identical interface for doing something that the existing ioctl is
perfectly capable of doing?  I'd still need special flags to control
the ioctl behaviour even though it uses struct fiemap and plumbing,
so it seemed pointless to introduce a new ioctl....
This brings us one step close to the norton disk doctor defrag display.
I'm all for it in the main fiemap call, it makes much more sense for the
users I think.

-chris

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help