Fs copy fix for "Invalid cross-device link" #886
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometime between linux 5.3 and 5.18, a regression prevented files from copying across devices using
copy_file_range()
. Boost created a workaround for 1.78, and it was fixed in the 6.x kernel, but depending on what packages are offered in the distro, this problem may still remain.Replicated with the following system:
A
boost::filesystem::copy_file: Invalid cross-device link:
will occur whentransmissionArchive
is true, and trunk-recorder attempts to copy the tx wavs from a ram-basedtempDir
to conventional storage atcaptureDir
at the conclusion of a call. Previous mitigation techniques were either to disable transmissionArchive, or move the tempDir to the same device as captureDir.This should help address issues like #843 by allowing the users with affected kernels to manually install newer version of boost libs, or allow users with 6.x kernels and affected boost libs to use std::filesystem instead.