f2fs: support FALLOC_FL_ZERO_RANGE
authorChao Yu <chao2.yu@samsung.com>
Wed, 6 May 2015 05:11:13 +0000 (13:11 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 28 May 2015 22:41:43 +0000 (15:41 -0700)
commit75cd4e098d178433436abce08146a21647bb4585
treef794bfeb552887eae64d3877ed4dd916e41a49a2
parentb4ace33703243fed56f8bfc80a001533acb9decb
f2fs: support FALLOC_FL_ZERO_RANGE

Now, FALLOC_FL_ZERO_RANGE flag in ->fallocate is supported in ext4/xfs.

In commit, the semantics of this flag is descripted as following:"
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 between
   [offset, last allocated extent] towards right by len bytes. This step
   will make a hole of len bytes at offset."

This patch implements fallocate's FALLOC_FL_ZERO_RANGE for f2fs.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
This page took 0.025222 seconds and 5 git commands to generate.