Skip to content

fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

Namjae Jeon linux-api linux-ext4 linux-fsdevel linux-man linux-xfs lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest12 patches 5 repliesIn review
  2. v1 posting 2/212 patches 8 repliesSuperseded
  3. v911 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v811 patches10 repliesSuperseded
v1 posting 1/23 patches6 repliesSuperseded

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12fs: Add support FALLOC_FL_INSERT_RANGE for fallocatefs/open.c include/linux/falloc.h include/uapi/linux/falloc.h+29 -21 reply
2/12xfs: Add support FALLOC_FL_INSERT_RANGE for fallocatefs/xfs/libxfs/xfs_bmap.c fs/xfs/libxfs/xfs_bmap.h fs/xfs/xfs_bmap_util.c +3 more+461 -830 replies
3/12ext4: Add support FALLOC_FL_INSERT_RANGE for fallocatefs/ext4/ext4.h fs/ext4/extents.c include/trace/events/ext4.h+282 -510 replies
4/12xfsprog: xfsio: update xfs_io manpage for FALLOC_FL_INSERT_RANGEman/man8/xfs_io.8+5 -00 replies
5/12xfstests: generic/058: Standard insert range testscommon/punch common/rc tests/generic/058 +2 more+150 -10 replies
6/12xfstests: generic/060: Delayed allocation insert rangetests/generic/060 tests/generic/060.out tests/generic/group+144 -00 replies
7/12xfstests: generic/061: Multi insert range teststests/generic/061 tests/generic/061.out tests/generic/group+146 -00 replies
8/12xfstests: generic/063: Delayed allocation multi inserttests/generic/063 tests/generic/063.out tests/generic/group+146 -00 replies
9/12xfstests: generic/064: Test multiple fallocate insert/collapse range callstests/generic/064 tests/generic/064.out tests/generic/group+98 -00 replies
10/12xfstests: fsstress: Add fallocate insert range operationltp/fsstress.c src/global.h+20 -32 replies
11/12xfstests: fsx: Add fallocate insert range operationltp/fsx.c+114 -100 replies
12/12manpage: update FALLOC_FL_INSERT_RANGE flag in fallocateman2/fallocate.2+82 -62 replies

Reviews trailers per patch

5 of 12 patches have a Reviewed-by or Acked-by.

PatchBrian FosterDave Chinner
1/12
2/12R-b
3/12
4/12R-b
5/12
6/12
7/12
8/12
9/12R-b
10/12R-b
11/12R-b
12/12

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

Read the v10 thread

Cover letter [PATCH v10 0/12] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

From: Namjae Jeon <[email protected]>

In continuation of the work of making the process of non linear editing of media files faster, we introduce here the new flag FALLOC_FL_INSERT_RANGE for fallocate.

This flag will work opposite to the FALLOC_FL_COLLAPSE_RANGE flag. As such, specifying FALLOC_FL_INSERT_RANGE flag will create new space inside file by inserting a hole within the range specified by offset and len. User can write new data in this space. e.g. ads.
Like collapse range, currently we have the limitation that offset and len should be block size aligned for both XFS and Ext4.

The semantics of the flag are :
1) It creates space within file by inserting a hole of len bytes starting at offset byte without overwriting any existing data. All the data blocks from offset to EOF are shifted towards right to make hole space.
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) Insert range does not work for the case when offset is overlapping/beyond i_size. If the user wants to insert space at the end of file they are advised to use either ftruncate(2) or fallocate(2) with mode 0.
5) It increses the size of file by len bytes.

Namjae Jeon (12):
fs: Add support FALLOC_FL_INSERT_RANGE for fallocate
xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate
ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate
xfsprog: xfsio: update xfs_io manpage for FALLOC_FL_INSERT_RANGE
xfstests: generic/042: Standard insert range tests
xfstests: generic/043: Delayed allocation insert range
xfstests: generic/044: Multi insert range tests
xfstests: generic/045: Delayed allocation multi insert
xfstests: generic/046: Test multiple fallocate insert/collapse range calls
xfstests: fsstress: Add fallocate insert range operation
xfstests: fsx: Add fallocate insert range operation
manpage: update FALLOC_FL_INSERT_RANGE flag in fallocate

Signature · 1 line
1.7.9.5