Skip to content

xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate

Carlos Maiolino requested to merge cmaiolino/centos-stream-9:cs9_bz2034871 into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2034871 CVE: CVE-2021-4155 Tested: xfstests and specific reproducer

The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at the end of files, just like fallocate and RESVSP. Make the behavior consistent with the other ioctls.

Reported-by: Kirill Tkhai ktkhai@virtuozzo.com Signed-off-by: Darrick J. Wong djwong@kernel.org Signed-off-by: Darrick J. Wong darrick.wong@oracle.com Reviewed-by: Dave Chinner dchinner@redhat.com Reviewed-by: Eric Sandeen sandeen@redhat.com (cherry picked from commit 983d8e60f50806f90534cc5373d0ce867e5aaf79)

Signed-off-by: Carlos Maiolino cmaiolino@redhat.com

Merge request reports