diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2015-03-25 15:08:56 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-03-25 15:08:56 +1100 |
commit | a904b1ca5751faf5ece8600e18cd3b674afcca1b (patch) | |
tree | 2b757182d3b07c4df47b45571f579cb93af8bc9b /include/linux/falloc.h | |
parent | dd46c787788d5bf5b974729d43e4c405814a4c7d (diff) | |
download | linux-a904b1ca5751faf5ece8600e18cd3b674afcca1b.tar.gz linux-a904b1ca5751faf5ece8600e18cd3b674afcca1b.tar.bz2 linux-a904b1ca5751faf5ece8600e18cd3b674afcca1b.zip |
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>
Diffstat (limited to 'include/linux/falloc.h')
0 files changed, 0 insertions, 0 deletions