[PATCH v0 0/1] exfat: add limited FALLOC_FL_ZERO_RANGE support
From: David Timber
Date: Thu Mar 19 2026 - 00:36:19 EST
This is part of my exFAT fragmentation optimisation project.
As exFAT is fundamentally based on linked-list structure, cluster
allocation is not a cheap operation - it involves walking the cluster
chain as well as bitmap so it's not particularly easy on flash devices.
The purpose of VDL is in part addressing the issue by allowing users
to clear the contents of files without changing the cluster layout by
only updating VDL which is O(1) op. I.e. reduced flash wear.
The fallocate support should see applications in recording devices like
dashcams, IP cameras and DVRs(digital video recorders). Such devices
typically implement FIFO-style file rotation. Also, the technique
could be potentially utilise to eliminate the chance of fragmentation
if the device preallocates clusters for large media files.
The `fallocate -d ...` and `cp --sparse=always ...`
commands(util-linux) can be used on the files in exFAT to detect zeros
leading up to EOF and update the VDL accordingly.
David Timber (1):
exfat: add limited FALLOC_FL_ZERO_RANGE support
fs/exfat/file.c | 75 +++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 64 insertions(+), 11 deletions(-)
--
2.53.0.1.ga224b40d3f.dirty