exfat: add limited FALLOC_FL_ZERO_RANGE support
Get series with b4
b4 am [email protected]Versions newest first
- v0 Latest1 patch 1 replyIn review
Patches in v0 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | exfat: add limited FALLOC_FL_ZERO_RANGE supportfs/ | +64 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.
Cover letter [PATCH v0 0/1] exfat: add limited FALLOC_FL_ZERO_RANGE support
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(-)
Signature · 1 line
2.53.0.1.ga224b40d3f.dirty