Changing the subject, because this is really a separate question...
Dominic Giampaolo <mailto:dgiampa...@apple.com>
December 14, 2017 at 9:17 AM
Finally, I've got some new questions as I explore using "holes" and sparse files. 
Specifically, if I punch a "hole" in a files with F_PUNCHHOLE, can I later use 
F_PREALLOCATE to re-allocate those blocks before I write into them?

No.  Just write real data to the hole and apfs will handle allocating blocks 
for it.  You don't have to worry about that.
I understand that the filesystem will handle allocating the blocks, just as I understand writing past the EOF will allocate more blocks.

What I'm asking is that, before I start filling a hole, can I preallocate the space for that hole so I won't be surprised by a disk full error in the middle of filling it (and to optimize the allocation of that space)?

Or, said another way, and probably an easier question to answer: Do the blocks used to satisfy writing into holes come from the same pool of preallocated blocks?


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (Filesystem-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to