Re: [Question] UFS/FFS: why a block is always allocated at EOF when truncating up

Dag-Erling Smørgrav <[email protected]>
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]>
Frank Leonhardt <[email protected]> writes:
> Dag-Erling Smørgrav <[email protected]> writes:
> > XNU (macOS, iOS etc.) has them too. They seem to have been added in
> > 2017, ten years after FreeBSD got them.
> I think they were added at 10.15, which is even more recent and were
> considered quite buggy* until 12.0. Odd, because APFS does support
> sparse files.

I wasn't asking.  They were added in 10.13 / Mavericks (xnu-4570.1.46)
and work perfectly fine, though APFS hole semantics are a little weird;
it tends not to want to create holes smaller than about 1 MB.

You can see for youself here, but note that you have to look at the
author date rather than the commit date, because everything older than
12 / Monterey has the same commit date of 2021-10-06:

    https://github.com/apple-oss-distributions/xnu/

The repository gets updated a few weeks to a couple of months after each
A (fall) and E (spring) release.

copyfile(3) got support for copying holes in 10.15 / Catalina:

    https://github.com/apple-oss-distributions/copyfile/

cp(1) got it in 14 / Sonoma, install(1) in 15 / Sequoia:

    https://github.com/apple-oss-distributions/file_cmds/

DES
-- 
Dag-Erling Smørgrav - [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.