Re: Collapsing ranges in sparse files in APFS?
Re: Collapsing ranges in sparse files in APFS?
- Subject: Re: Collapsing ranges in sparse files in APFS?
- From: Chris Sarcone <email@hidden>
- Date: Mon, 21 Jan 2019 17:19:29 -0800
Hi Jens —
> On Jan 20, 2019, at 3:14 PM, Jens Alfke <email@hidden> wrote:
>
> I’m looking into sparse-file operations in APFS. I see I can use fcntl to
> preallocate space and to punch holes in a file. But I don’t see a command to
> remove a byte range from a file without leaving a hole, equivalent to the
> FALLOC_FL_COLLAPSE_RANGE mode of Linux’s fallocate, described thus:
>
>> Specifying the FALLOC_FL_COLLAPSE_RANGE flag (available since Linux 3.15) in
>> mode removes a byte range from a file, without leaving a hole. The byte
>> range to be collapsed starts at offset and continues for len bytes. At the
>> completion of the operation, the contents of the file starting at the
>> location offset+len will be appended at the location offset, and the file
>> will be len bytes smaller.
>
> Is there such an operation in Darwin, with an APFS filesystem?
No, but you can file a Radar bug asking for the feature and we can evaluate it
for inclusion.
Thanks,
— Chris
------------------
19191 Vallco Parkway
M/S 77-1SSG
Cupertino CA 95014
phone: (408) 974-4033
fax: (408) 862-7577
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden