mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
3ec4ec2857
This changeset allows Docker's VFS, and Overlay to take advantage of Linux's zerocopy APIs. The copy function first tries to use the ficlone ioctl. Reason being: - they do not allow partial success (aka short writes) - clones are expected to be a fast metadata operation See: http://oss.sgi.com/archives/xfs/2015-12/msg00356.html If the clone fails, we fall back to copy_file_range, which internally may fall back to splice, which has an upper limit on the size of copy it can perform. Given that, we have to loop until the copy is done. For a given dirCopy operation, if the clone fails, we will not try it again during any other file copy. Same is true with copy_file_range. If all else fails, we fall back to traditional copy. Signed-off-by: Sargun Dhillon <sargun@sargun.me> |
||
---|---|---|
.. | ||
copy.go | ||
copy_test.go |