xfs: Introduce XFS_IOC_ZERO_RANGE
authorDave Chinner <dchinner@redhat.com>
Tue, 24 Aug 2010 02:02:11 +0000 (12:02 +1000)
committerAlex Elder <aelder@sgi.com>
Mon, 18 Oct 2010 20:07:25 +0000 (15:07 -0500)
commit447223520520b17d3b6d0631aa4838fbaf8eddb4
tree068716a0537e0f7007a037073c4b7bc608233c1e
parent3ae4c9deb30a8d5ee305b461625dcb298c9804a9
xfs: Introduce XFS_IOC_ZERO_RANGE

XFS_IOC_ZERO_RANGE is the equivalent of an atomic XFS_IOC_UNRESVSP/
XFS_IOC_RESVSP call pair. It enabled ranges of written data to be
turned into zeroes without requiring IO or having to free and
reallocate the extents in the range given as would occur if we had
to punch and then preallocate them separately.  This enables
applications to zero parts of files very quickly without changing
the layout of the files in any way.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/linux-2.6/xfs_ioctl32.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.h
fs/xfs/xfs_fs.h
fs/xfs/xfs_vnodeops.c