All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] getfsmapx ioctl
@ 2016-05-05 19:47 ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2016-05-05 19:47 UTC (permalink / raw)
  To: Mark Fasheh, Josef Bacik, Dave Chinner, Theodore Ts'o,
	Ross Zwisler, Dan Williams, Darrick J. Wong
  Cc: linux-fsdevel, linux-api, xfs, linux-btrfs, linux-ext4

Hi,

Building on the discussion "Exposing Extent Information to Userspace"
at LSF, this patchset offers the userspace definition, implementation,
and manpages for a new FS_IOC_GETFSMAPX ioctl that enables userspace
to query the filesystem for a map of every extent in a given range of
physical block keyspace.

Note that prior to the existence of block sharing, I'd have said
"given range of physical blocks", but now that we can return multiple
owner:offset pairs for a given block, the block keyspace now has to
include extra fields to uniquely identify a reverse mapping record.

This ioctl behaves in a similar manner to XFS_IOC_GETBMAPX -- pass in
an array of struct getfsmapx with key and other control values in the
first two array elements, and the kernel passes back extent
information in the other array elements.  The particulars of how to do
this are documented in the manpage that goes along with this set (it
applies against man-pages.git) and example code in the other patches
is against xfsprogs.git#for-next.

Basically, set the lowest key for which you want records in the first
array element; the highest key in the second; and the kernel spits out
records in the rest of the elements.  That's similar to how GETBMAPX
does it, but different from FIEMAP.  I added a dummy 64-bit "device
id" per Josef's request, though I'm thinking that could be cut down to
a simple dev_t.  I also wonder if the kernel should rewrite the low
key with the last element returned so as to seed the next call, but
userspace can do that too.

The kernel-space implementation (for XFS) is buried inside the xfs
reverse mapping patchset which is treading water at github[1].  I
prefer not to patchbomb the whole kernel series until I've put the
mess through better testing, but this should be enough to get the
mailing list discussion started.

Questions?  Comments?  Bike sheds?

--D

[1] https://github.com/djwong/linux/tree/djwong-experimental

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-05 19:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 19:47 [RFC 0/3] getfsmapx ioctl Darrick J. Wong
2016-05-05 19:47 ` Darrick J. Wong
2016-05-05 19:47 ` Darrick J. Wong
2016-05-05 19:50 ` [PATCH 1/3] document the XFS_IOC_GETFSMAPX ioctl Darrick J. Wong
2016-05-05 19:50   ` Darrick J. Wong
2016-05-05 19:51 ` [PATCH 2/3] xfs: introduce " Darrick J. Wong
2016-05-05 19:51   ` Darrick J. Wong
2016-05-05 19:52 ` [PATCH 3/3] xfs_io: support the new getfsmap ioctl Darrick J. Wong
2016-05-05 19:52   ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.