linux-stable/fs/xfs/libxfs
Namjae Jeon a904b1ca57 xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate
This patch implements fallocate's FALLOC_FL_INSERT_RANGE for XFS.

1) Make sure that both offset and len are block size aligned.
2) Update the i_size of inode by len bytes.
3) Compute the file's logical block number against offset. If the computed
   block number is not the starting block of the extent, split the extent
   such that the block number is the starting block of the extent.
4) Shift all the extents which are lying bewteen [offset, last allocated extent]
   towards right by len bytes. This step will make a hole of len bytes
   at offset.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2015-03-25 15:08:56 +11:00
..
xfs_alloc.c xfs: xfs_alloc_fix_minleft can underflow near ENOSPC 2015-02-24 10:16:04 +11:00
xfs_alloc.h xfs: merge xfs_ag.h into xfs_format.h 2014-11-28 14:25:04 +11:00
xfs_alloc_btree.c xfs: merge xfs_ag.h into xfs_format.h 2014-11-28 14:25:04 +11:00
xfs_alloc_btree.h
xfs_attr.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_attr_leaf.c xfs: consolidate superblock logging functions 2015-01-22 09:10:31 +11:00
xfs_attr_leaf.h
xfs_attr_remote.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_attr_remote.h
xfs_attr_sf.h
xfs_bit.h
xfs_bmap.c xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate 2015-03-25 15:08:56 +11:00
xfs_bmap.h xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate 2015-03-25 15:08:56 +11:00
xfs_bmap_btree.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_bmap_btree.h
xfs_btree.c xfs: pass mp to XFS_WANT_CORRUPTED_RETURN 2015-02-23 22:39:13 +11:00
xfs_btree.h xfs: require 64-bit sector_t 2014-07-30 09:12:05 +10:00
xfs_cksum.h
xfs_da_btree.c Merge branch 'xfs-misc-fixes-for-3.19-2' into for-next 2014-12-04 09:46:17 +11:00
xfs_da_btree.h
xfs_da_format.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_da_format.h
xfs_dir2.c Merge branch 'xfs-misc-fixes-for-3.19-2' into for-next 2014-12-04 09:46:17 +11:00
xfs_dir2.h xfs: move type conversion functions to xfs_dir.h 2014-12-04 09:43:17 +11:00
xfs_dir2_block.c Merge branch 'xfs-misc-fixes-for-3.19-2' into for-next 2014-12-04 09:46:17 +11:00
xfs_dir2_data.c xfs: pass mp to XFS_WANT_CORRUPTED_RETURN 2015-02-23 22:39:13 +11:00
xfs_dir2_leaf.c Merge branch 'xfs-misc-fixes-for-3.19-2' into for-next 2014-12-04 09:46:17 +11:00
xfs_dir2_node.c Merge branch 'xfs-misc-fixes-for-3.19-2' into for-next 2014-12-04 09:46:17 +11:00
xfs_dir2_priv.h xfs: move type conversion functions to xfs_dir.h 2014-12-04 09:43:17 +11:00
xfs_dir2_sf.c Merge branch 'xfs-misc-fixes-for-3.19-2' into for-next 2014-12-04 09:46:17 +11:00
xfs_dquot_buf.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_format.h Merge branch 'xfs-sb-logging-rework' into for-next 2015-01-22 09:20:53 +11:00
xfs_fs.h xfs: move xfs_fs.h to libxfs 2015-01-09 10:45:13 +11:00
xfs_ialloc.c xfs: pass mp to XFS_WANT_CORRUPTED_RETURN 2015-02-23 22:39:13 +11:00
xfs_ialloc.h xfs: merge xfs_ag.h into xfs_format.h 2014-11-28 14:25:04 +11:00
xfs_ialloc_btree.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_ialloc_btree.h
xfs_inode_buf.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_inode_buf.h
xfs_inode_fork.c xfs: merge xfs_inum.h into xfs_format.h 2014-11-28 14:27:10 +11:00
xfs_inode_fork.h
xfs_log_format.h xfs: merge xfs_dinode.h into xfs_format.h 2014-11-28 14:24:06 +11:00
xfs_log_recover.h
xfs_log_rlimit.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_quota_defs.h
xfs_rtbitmap.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_sb.c xfs: remove old and redundant comment in xfs_mount_validate_sb 2015-02-24 10:15:04 +11:00
xfs_sb.h xfs: consolidate superblock logging functions 2015-01-22 09:10:31 +11:00
xfs_shared.h xfs: consolidate superblock logging functions 2015-01-22 09:10:31 +11:00
xfs_symlink_remote.c xfs: set buf types when converting extent formats 2015-01-22 09:30:06 +11:00
xfs_trans_resv.c xfs: consolidate superblock logging functions 2015-01-22 09:10:31 +11:00
xfs_trans_resv.h xfs: consolidate superblock logging functions 2015-01-22 09:10:31 +11:00
xfs_trans_space.h
xfs_types.h xfs: move xfs_types.h to libxfs 2015-01-09 10:46:31 +11:00