Remix.run Logo
Dylan16807 3 days ago

Sparse files would be useful but I'm pretty sure sparse files on NTFS always reserve their full size. Eating 1TB of free space for my ext4.vhdx is a non-starter.

banana_giraffe 3 days ago | parent | next [-]

https://gist.github.com/Q726kbXuN/c80028aa1714032546d3b442c1...

Nope, they don't eat up space. One of the fun side effects of sparse files on NTFS is calling WriteFile on the sparse file can lead to an ERROR_DISK_QUOTA_EXCEEDED error, which applications tend to not expect.

wtallis 3 days ago | parent | prev [-]

Based on https://learn.microsoft.com/en-us/windows/win32/fileio/spars... and subsequent links, it sounds like sparse files count against disk quotas as if they weren't sparse, but otherwise sparse files actually work on NTFS.

If sparse files didn't save on actual space allocations, it would simply be a lie to call them sparse files. Granted, that's totally something Microsoft would do, and has done for other features they lack, but that doesn't seem to be the case here.