-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
NOTES
11 lines (6 loc) · 935 Bytes
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
File clone checking on APFS: https://stackoverflow.com/a/65241088/149482.
On Windows, file cloning appears to be possible with https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ni-winioctl-fsctl_duplicate_extents_to_file. The destination file is opened, then the regions of the source file are specified and the clone occurs. It might not be available on NTFS.
For filesystems where cloning is not supported, it should be possible to "fall back" to synchronously reading while a transaction is open, or providing an API to copy out or lock values more efficiently than is usually available.
Here's a list of support https://www.ctrl.blog/entry/file-cloning.html.
Solaris will need this https://docs.oracle.com/cd/E88353_01/html/E37843/reflink-3c.html.
Disk space usage in the face of file cloning could be done with fcntl F_LOG2PHYS on macOS, ioctl FIEMAP on Linux, and possibly FSCTL_GET_RETRIEVAL_POINTERS on Windows.