Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying file from virtual filesystems fails silently #24

Open
tarka opened this issue May 12, 2022 · 0 comments
Open

Copying file from virtual filesystems fails silently #24

tarka opened this issue May 12, 2022 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@tarka
Copy link
Owner

tarka commented May 12, 2022

There is a known issue with copy_file_range() that will result in files copied from virtual filesystems (e.g. /proc, /sys) to copy the incorrect number of bytes (usually 0 in the case of /proc, but possibly other sizes). LWN has a good summary here:

https://lwn.net/Articles/846403/

Detecting such filesystems/files is hard, as there is no "FS is virtual" flag, so all file sizes are inherently suspect when working this way. This issue is exaserbated in the case of xcp's block-parallel driver (parblock), which needs to know the file size up-front to allocate work on the queues.

This issue needs more investigation, and possibly some fundamental rearchitecting in the case of parallel block copy.

@tarka tarka added bug Something isn't working enhancement New feature or request labels May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant