f2fs: support FALLOC_FL_COLLAPSE_RANGE
authorChao Yu <chao2.yu@samsung.com>
Wed, 6 May 2015 05:09:46 +0000 (13:09 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 28 May 2015 22:41:42 +0000 (15:41 -0700)
commitb4ace33703243fed56f8bfc80a001533acb9decb
tree4662ebc41794a1539c78fea1a779c7fb268fc83b
parent19f106bc03e62739961249a29916ee3602ac3de9
f2fs: support FALLOC_FL_COLLAPSE_RANGE

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

In commit, the semantics of this flag is descripted as following:"
1) It collapses the range lying between offset and length by removing any
   data blocks which are present in this range and than updates all the
   logical offsets of extents beyond "offset + len" to nullify the hole
   created by removing blocks. In short, it does not leave a hole.
2) It should be used exclusively. No other fallocate flag in combination.
3) Offset and length supplied to fallocate should be fs block size aligned
   in case of xfs and ext4.
4) Collaspe range does not work beyond i_size."

This patch implements fallocate's FALLOC_FL_COLLAPSE_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.027173 seconds and 5 git commands to generate.