From: Namjae Jeon Date: Wed, 25 Mar 2015 04:08:56 +0000 (+1100) Subject: xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate X-Git-Tag: omap-for-v4.1/fixes-rc1~44^2~2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a904b1ca5751faf5ece8600e18cd3b674afcca1b;p=pandora-kernel.git 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 Signed-off-by: Ashish Sangwan Reviewed-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- Reading git-diff-tree failed