-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Hello! I am looking into implementing more functionality out of fallocate
, starting with the ability to punch holes (FALLOC_FL_PUNCH_HOLE
) to deallocate space in the middle of files.
This is possible on Linux via fallocate
, macOS via fcntl
and Windows (NTFS) via DeviceIoControl
. Not sure about others but I think it's a good enough start.
I could see inserting holes in files (FALLOC_FL_INSERT_RANGE
) or collapsing files (FALLOC_FL_COLLAPSE_RANGE
) as being potentially useful for RabbitMQ.
I am looking for pointers on what the interface should look like, as much of the work to implement this deals with file
, prim_file
and raw_file_*
modules. Should I add a file:allocate/4
with an option list, or make a new function dedicated to creating/collapsing holes?