summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-10-09 16:42:59 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-10-10 10:00:56 -0700
commitd8d2007d05a67dabfb1783027b15dd05f3b1b4a1 (patch)
treeede60f180fd152cc791dd77a659ff14476c3cb10 /init
parent6b984c2cfc95bd10796313c6f1733e6ca7494846 (diff)
xfs: fix fallocate functions when rtextsize is larger than 1rt-fixes-5.10_2020-10-10
In commit fe341eb151ec, I forgot that xfs_free_file_space isn't strictly a "remove mapped blocks" function. It is actually a function to zero file space by punching out the middle and writing zeroes to the unaligned ends of the specified range. Therefore, putting a rtextsize alignment check in that function is wrong because that breaks unaligned ZERO_RANGE on the realtime volume. Furthermore, xfs_file_fallocate already has alignment checks for the functions require the file range to be aligned to the size of a fundamental allocation unit (which is 1 FSB on the data volume and 1 rt extent on the realtime volume). Create a new helper to return the desired allocation unit size, fix the fallocate frontend to use it, fix free_file_space to delete the correct range, and remove a now redundant check from insert_file_space. Fixes: fe341eb151ec ("xfs: ensure that fpunch, fcollapse, and finsert operations are aligned to rt extent size") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions