Skip to content

fs: Introduce new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

Namjae Jeon linux-ext4 linux-fsdevel linux-mm linux-xfs lkml 7 versions – Applied

Status from this message: I've applied Namjae Jeon's patch (thanks Namjae!), and done a lot of

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest10 patches 36 repliesApplied
  2. v1 posting 3/310 patches 17 repliesSuperseded
  3. v410 patches 2 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v1 posting 2/37 patches15 repliesSuperseded
v37 patches0 repliesSuperseded
v27 patches10 repliesSuperseded
v1 posting 1/33 patches21 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/10fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocatefs/open.c include/uapi/linux/falloc.h+42 -37 replies
2/10xfs: Add support FALLOC_FL_COLLAPSE_RANGE for fallocatefs/xfs/xfs_bmap.c fs/xfs/xfs_bmap.h fs/xfs/xfs_bmap_util.c +3 more+324 -22 replies
3/10ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocatefs/ext4/ext4.h fs/ext4/extents.c fs/ext4/move_extent.c +1 more+332 -22 replies
4/10xfsprog: xfsio: Add support FALLOC_FL_COLLAPSE_RANGE for fallocateio/prealloc.c man/man8/xfs_io.8+45 -20 replies
5/10xfstest: shared/001: Standard collapse range testscommon/punch common/rc tests/shared/001 +2 more+222 -630 replies
6/10xfstest: shared/002: Delayed allocation collapse rangetests/shared/002 tests/shared/002.out tests/shared/group+115 -00 replies
7/10xfstest: shared/003: Multi collapse range teststests/shared/003 tests/shared/003.out tests/shared/group+115 -00 replies
8/10xfstest: shared/004: Delayed allocation multi collapsetests/shared/004 tests/shared/004.out tests/shared/group+115 -00 replies
9/10xfstest: shared/005: Test multiple fallocate collapsetests/shared/005 tests/shared/005.out tests/shared/group+95 -00 replies
10/10manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocateman2/fallocate.2+21 -010 replies

Reviews trailers per patch

3 of 10 patches have a Reviewed-by or Acked-by.

PatchDave ChinnerDongsu Park
1/10R-b
2/10R-b
3/10T-b
4/10R-b
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/10] fs: Introduce new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

From: Namjae Jeon <[email protected]>

This patch series is in response of the following post:
http://lwn.net/Articles/556136/
"ext4: introduce two new ioctls"

Dave chinner suggested that truncate_block_range
(which was one of the ioctls name) should be an fallocate operation and not any fs specific ioctl, hence we add this functionality to fallocate.

This patch series introduces new flag FALLOC_FL_COLLAPSE_RANGE for fallocate and implements it for XFS and Ext4.

The semantics of this flag are 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 new functionality of collapsing range could be used by media editing tools which does non linear editing to quickly purge and edit parts of a media file. This will immensely improve the performance of these operations. The limitation of fs block size aligned offsets can be easily handled by media codecs which are encapsulated in a conatiner as they have to just change the offset to next keyframe value to match the proper alignment.

Namjae Jeon (10):
fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate
xfs: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate
ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate
xfsprog: xfsio: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate
xfstest: shared/001: Standard collapse range tests
xfstest: shared/002: Delayed allocation collapse range
xfstest: shared/003: Multi collapse range tests
xfstest: shared/004: Delayed allocation multi collapse
xfstest: shared/005: Test multiple fallocate collapse
manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate

Signature · 7 lines
1.7.11-rc0


_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs