When COPYFILE_FICLONE is used #57
sebastianrath
started this conversation in
General
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment
SnowFS
uses a special copy routine, ifAPFS
orReFS
is detected. For Linux (or as a fallback for other filesystems), the default copy routine of node is used withCOPYFILE_FICLONE
.https://github.com/Snowtrack/SnowFS/blob/cd27f4e60d1cd881a2c55926171ffa969497f80b/src/io_context.ts#L295
The documentation does not explain, which filesystems are covered by
COPYFILE_FICLONE
. (e.g. not forAPFS
). It only states:https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_mode_callback
The implementation is covered by libuv and uses the implementation of
FICLONE
(https://github.com/nodejs/node/blob/148bc33347266a0293d52859cbf9580ade9b6cbe/deps/uv/src/unix/fs.c#L1253)
FICLONE
is defined here:https://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html
Beta Was this translation helpful? Give feedback.
All reactions