3 ms·
It isn't (though it is CoW towards atomic file writing), and my comment was a bit tongue-in-cheek, since there really is nothing close to a portable API to do t
by dom0 10y ago
It isn't (though it is CoW towards atomic file writing), and my comment was a bit tongue-in-cheek, since there really is nothing close to a portable API to do that. Linux recently gained a copy_file_range syscall which is part of the VFS - so a CoW FS or an FS with extent sharing should be able to implement the expected semantics here. Linux also has a bunch of ioctls that directly manipulate extents, like the FICLONERANGE mentioned above or FIDEDUPERANGE. For these to work reliably you need a lot of not-easily available information (in the general case)... these interfaces are comparable in application impl complexity to, say, O_DIRECT.