All of lore.kernel.org
 help / color / mirror / Atom feed
* [vfs PATCH v3 0/4] vfs: Expand iomap interface to fiemap
@ 2016-03-04 20:11 Bob Peterson
  2016-03-04 20:11 ` [vfs PATCH v3 1/4] VFS: move iomap from exportfs.h to iomap.h Bob Peterson
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Bob Peterson @ 2016-03-04 20:11 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Jan Kara, Al Viro, Dave Chinner, Christoph Hellwig

Patch set history:
------------------
o Back in October 2014, I proposed an improvement to fiemap to accomodate
  very large sparse files. This was done because the existing blockmap-based
  code skips holes one block at a time, which is extremely slow when it comes
  to large holes. For example, doing fiemap on a 1PB file whose only byte
  exists at EOF can take an extremely long time. To recreate:

dd if=/dev/zero of=/mnt/holey-P bs=1 count=1 seek=1P
time filefrag -v /mnt/holey-P

  At that time, someone suggested I use the iomap interface proposed by
  Dave Chinner a long time ago, and so my patches never got off the ground
  (until now).

  Since then, Christoph apparently added the basics of iomap to exportfs.h.
  which today is minimal, and limited to exportfs users.

o On 11 January 2016, I posted a vfs patch that expanded the use of the iomap
  infrastructure, but iomap was added to address_space_operations.

o On 21 January 2016, Jan Kara suggested it NOT be included as an a_op,
  but rather, to have the new iomap function be passed in, similar to
  get_blocks(), along with some pretty generic flags, rather than a set of
  commands.

o on 03 March, I posted a v2 patch set to implement Jan's suggestions.

o on 04 March, Christoph made some suggestions. This v3 patch set is an
  attempt to implement those suggestions.

Patch description:
------------------
The first patch only moves the iomap declares from exportfs.h to its own
iomap.h.

The second patch declares a new iomap_get_t function, similar to get_block_t,
to be used to get iomap information, much like get_block_t is used to get
block information. It adds a new __generic_iomap_fiemap interface to be used
by file systems who choose to use it. My original version of this function
looked nearly identical to the blockmap version, but this one is smaller and
simpler. So if people don't like my implementation, I can revert to that one.

The third patch introduces a new __gfs2_io_map function to the GFS2 file
system.

The fourth patch hooks the new function into GFS2's fiemap to take
advantage of the new code.

The result: for a 1PB sparse file, filefrag takes milliseconds rather
than a week.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
Bob Peterson (4):
  VFS: move iomap from exportfs.h to iomap.h
  VFS: Add new __generic_iomap_fiemap interface
  GFS2: Add function gfs2_get_iomap
  GFS2: Use new iomap interface for fiemap

 fs/gfs2/bmap.c           | 151 +++++++++++++++++++++++++++++++++++++++++++++++
 fs/gfs2/bmap.h           |   2 +
 fs/gfs2/inode.c          |   4 +-
 fs/ioctl.c               |  96 ++++++++++++++++++++++++++++++
 include/linux/exportfs.h |  16 +----
 include/linux/fs.h       |  11 +++-
 include/linux/iomap.h    |  25 ++++++++
 7 files changed, 287 insertions(+), 18 deletions(-)
 create mode 100644 include/linux/iomap.h

-- 
2.5.0


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

end of thread, other threads:[~2016-04-13  0:22 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-04 20:11 [vfs PATCH v3 0/4] vfs: Expand iomap interface to fiemap Bob Peterson
2016-03-04 20:11 ` [vfs PATCH v3 1/4] VFS: move iomap from exportfs.h to iomap.h Bob Peterson
2016-03-15  7:29   ` Christoph Hellwig
2016-03-28 19:53     ` Bob Peterson
2016-03-29  7:40       ` Christoph Hellwig
2016-03-29 22:20         ` Dave Chinner
2016-03-30  6:47           ` Christoph Hellwig
2016-04-07 19:58             ` Bob Peterson
2016-04-07 20:42               ` Christoph Hellwig
2016-04-10 17:15           ` Christoph Hellwig
2016-04-11  6:17             ` Dave Chinner
2016-04-12 18:29               ` Christoph Hellwig
2016-04-13  0:22                 ` Dave Chinner
2016-03-04 20:11 ` [vfs PATCH v3 2/4] VFS: Add new __generic_iomap_fiemap interface Bob Peterson
2016-03-07 10:18   ` Jan Kara
2016-03-15  7:33   ` Christoph Hellwig
2016-03-04 20:11 ` [vfs PATCH v3 3/4] GFS2: Add function gfs2_get_iomap Bob Peterson
2016-03-04 20:11 ` [vfs PATCH v3 4/4] GFS2: Use new iomap interface for fiemap Bob Peterson
2016-03-15  7:33   ` Christoph Hellwig

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.