Skip to content

Sparse files #9616

@essen

Description

@essen

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?

Metadata

Metadata

Assignees

Labels

enhancementstalledwaiting for input by the Erlang/OTP teamteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions