5 ms·
It looks like this will zero out data but not remove.
by maxxxxx 7y ago
It looks like this will zero out data but not remove.
- andoma 7y agoIt will remove if you use FALLOC_FL_COLLAPSE_RANGE
- maxxxxx 7y agoBut: " A filesystem may place limitations on the granularity of the operation, in order to ensure efficient implementation. Typically, offset and len must be a multiple of the filesystem logical block size, which varies according to the filesystem type and configuration. If a filesystem has such a requirement, fallocate() fails with the error EINVAL if this requirement is violated." Seems it's limited.
- andoma 7y agoCorrect, my bad. Did some tests and AFAICT neither EXT4, XFS nor BTRFS allows arbitrary byte ranges here.
- deleted 7y ago[deleted]