-
Notifications
You must be signed in to change notification settings - Fork 59
fallocate issue #25
Comments
Unfortunately, this is the intended behavior. Unlike NTFS, exFAT doesn't support sparse files, which renders fallocate broken or useless(zero'ing out all ranges, which takes a lot of time). EDIT: Update below |
@arter97 |
We just want to use fallocate to occupy free space with minimal overhead, to reduce exFAT fragmentation. while writing several video files constantly to the SD card at same time. If we don't use fallocate the free space for every file, then all of the video files will be stored to interleaved clusters, and huge video file will be in many pieces. then if one of the video file is deleted, it will create many small free spaces and high fragmentation. One of the ideas is to use fallocate to occupy (eg. 256MB) size for each of the video file, but without real data written to SD card when we call fallocate, then we assume every file will be stored to contiguous 256MB space, and there will be no fragmentation at all. even if we finish writing the file and found it is only 180MB, we can ftruncate the file to 180MB and the left (256-180=76 MB) is still a very big free space and not fragmentation. We can use ftruncate() or lseek() to create a 256MB file but it will write a lot of data to SD card but not just simplify "mark the space" in exFAT table without writing data. VFAT in Linux can support fallocate() so we hope exfat can support it also. We don't need to create any Holes on exfat. just want contiguous file on SD card. any ideas ? thanks for your help. |
torvalds/linux@b13bb33eacb7 Looks like exFAT needs similar implementation. Given that exFAT driver is also made by Namjae, this could be done. |
This command is working for me fallocate -xl 1G test1g For some reason |
"the posix way" will fallback to something like plain zero |
exfat linux doesn't support fallocate
When running command
fallocate -l 1G test1G
command failed with output
The text was updated successfully, but these errors were encountered: