otp icon indicating copy to clipboard operation
otp copied to clipboard

Use `copy_file_range(2)` when available

Open RomaniukVadim opened this issue 2 years ago • 6 comments

Implemented copy_file_range(2) linux system cal when available. Github Issue

RomaniukVadim avatar Nov 27 '23 15:11 RomaniukVadim

CT Test Results

No tests were run for this PR. This is either because the build failed, or the PR is based on a branch without GH actions tests configured.

Results for commit 91b4350d79913a3a7fec63150924c7c58620db2c

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

github-actions[bot] avatar Nov 27 '23 15:11 github-actions[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 27 '23 15:11 CLAassistant

Hello! Thanks for the PR! I haven't done any review of this yet, but I noticed that you have placed the nif in kernel. All file related nifs are placed in erts/emulator/nifs + erts/preloaded/src/prim_file and so should this be.

garazdawi avatar Nov 27 '23 19:11 garazdawi

@garazdawi Hello! If this NIF and its related file should be placed in erts, I will put them there correspondingly and update my commit

RomaniukVadim avatar Nov 27 '23 20:11 RomaniukVadim

@garazdawi I moved nif and file to erts folder. For now I see what functions already exist for file open/read/write/error handling

RomaniukVadim avatar Nov 28 '23 17:11 RomaniukVadim

@jhogberg Thanks for reviewing my code. I'm aware this isn't as straightforward as I initially thought, but I'm committed to fixing all the issues and learning how this should be done in OTP. I hope to get my PR merged someday when the code is as close to done as possible. It would be great if someone from the contributors could check my comments from time to time as well.

RomaniukVadim avatar Nov 29 '23 11:11 RomaniukVadim