Skip to content

fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

Namjae Jeon linux-ext4 linux-fsdevel linux-xfs lkml 4 versions – In review

Get series with b4
b4 am '[email protected]'

Versions newest first · linked by author and title

  1. v7 Latest11 patches 11 repliesIn review
  2. v610 patches 4 repliesSuperseded
  3. v510 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v29 of 10 patches11 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11fs: Add support FALLOC_FL_INSERT_RANGE for fallocatefs/open.c include/uapi/linux/falloc.h+22 -12 replies
2/11xfs: 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+448 -852 replies
3/11ext4: Add support FALLOC_FL_INSERT_RANGE for fallocatefs/ext4/ext4.h fs/ext4/extents.c include/trace/events/ext4.h+282 -510 replies
4/11xfsprogs: xfs_io: add finsert command for insert range via fallocateio/prealloc.c+38 -11 reply
5/11xfstests: generic/039: Standard insert range testscommon/punch common/rc tests/generic/039 +2 more+150 -10 replies
6/11xfstests: generic/040: Delayed allocation insert rangetests/generic/040 tests/generic/040.out tests/generic/group+144 -00 replies
7/11xfstests: generic/041: Multi insert range teststests/generic/041 tests/generic/041.out tests/generic/group+146 -00 replies
8/11xfstests: generic/042: Delayed allocation multi inserttests/generic/042 tests/generic/042.out tests/generic/group+146 -00 replies
9/11xfstests: generic/043: Test multiple fallocate insert/collapse range callstests/generic/043 tests/generic/043.out tests/generic/group+115 -02 replies
10/11xfstests: fsstress: Add fallocate insert range operationltp/fsstress.c src/global.h+20 -32 replies
11/11xfstests: fsx: Add fallocate insert range operationltp/fsx.c+94 -22 replies

Reviews trailers per patch

2 of 11 patches have a Reviewed-by or Acked-by.

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

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

Read the v7 thread

Cover letter [PATCH v7 0/11] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

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 (11):
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
xfsprogs: xfs_io: add finsert command for insert range via fallocate
xfstests: generic/039: Standard insert range tests
xfstests: generic/040: Delayed allocation insert range
xfstests: generic/041: Multi insert range tests
xfstests: generic/042: Delayed allocation multi insert
xfstests: generic/043: Test multiple fallocate insert/collapse range calls
xfstests: fsstress: Add fallocate insert range operation
xfstests: fsx: Add fallocate insert range operation

Signature · 1 line
1.7.11-rc0