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

fs: fix ceph copy error truncating readonly files #3920

Merged
merged 1 commit into from Mar 12, 2023

Conversation

Varstahl
Copy link
Contributor

Trying to copy a read-only file onto a ceph-fuse filesystem fails, returning an EACCES error. This happens when the destination doesn't exist yet, and a new file is created.

By checking that the error matches, and that the destination file is empty, we can fix this issue while waiting for a proper Ceph fix to be upstreamed.

Fixes: #3919
Refs: nodejs/node#37284
Refs: #3117
Refs: #3322

Trying to copy a read-only file onto a ceph-fuse filesystem fails,
returning an `EACCES` error. This happens when the destination
doesn't exist yet, and a new file is created.

By checking that the error matches, and that the destination file
is empty, we can fix this issue while waiting for a proper Ceph
fix to be upstreamed.

Fixes: libuv#3919
Refs: nodejs/node#37284
Refs: libuv#3117
Refs: libuv#3322
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me. It is a kernel bug (drivers are not permitted to return EACCES), but there is precedent to working around other ceph-specific kernel bugs (#3117)

@bnoordhuis bnoordhuis merged commit dfb206c into libuv:v1.x Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copying a file onto ceph-fuse fails when the source is read-only
3 participants