[vfs PATCH v3 0/4] vfs: Expand iomap interface to fiemap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux