-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
cp failing sporadically due to EAGAIN being returned from copy_file_range #15170
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
13 tasks
Got an update on this, will be merged pretty fast. |
behlendorf
pushed a commit
that referenced
this issue
Aug 15, 2023
In 019dea0 we removed the conversion from EAGAIN->EXDEV inside zfs_clone_range(), but forgot to add a test for EAGAIN to the copy_file_range() entry points to trigger fallback to a content copy. This commit fixes that. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Kay Pedersen <mail@mkwg.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #15170 Closes #15172
usaleem-ix
pushed a commit
to truenas/zfs
that referenced
this issue
Aug 17, 2023
In 019dea0 we removed the conversion from EAGAIN->EXDEV inside zfs_clone_range(), but forgot to add a test for EAGAIN to the copy_file_range() entry points to trigger fallback to a content copy. This commit fixes that. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Kay Pedersen <mail@mkwg.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes openzfs#15170 Closes openzfs#15172
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Aug 25, 2023
In 019dea0 we removed the conversion from EAGAIN->EXDEV inside zfs_clone_range(), but forgot to add a test for EAGAIN to the copy_file_range() entry points to trigger fallback to a content copy. This commit fixes that. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Kay Pedersen <mail@mkwg.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes openzfs#15170 Closes openzfs#15172
behlendorf
pushed a commit
that referenced
this issue
Aug 25, 2023
In 019dea0 we removed the conversion from EAGAIN->EXDEV inside zfs_clone_range(), but forgot to add a test for EAGAIN to the copy_file_range() entry points to trigger fallback to a content copy. This commit fixes that. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Kay Pedersen <mail@mkwg.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #15170 Closes #15172
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Dec 12, 2023
In 019dea0 we removed the conversion from EAGAIN->EXDEV inside zfs_clone_range(), but forgot to add a test for EAGAIN to the copy_file_range() entry points to trigger fallback to a content copy. This commit fixes that. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Kay Pedersen <mail@mkwg.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes openzfs#15170 Closes openzfs#15172
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Describe the problem you're observing
Copying files using e.g.
cp
occasionally fails, giving an error likecp: error copying 'file_a' to 'file_b': Resource temporarily unavailable
.This is caused by
copy_file_range
in zfs returningEAGAIN
, something that seems to have been added in f21662d.The man page for
copy_file_range
does not mentionEAGAIN
as a possible error and I cannot say how many other programs, beyondcp
, also handleEAGAIN
as a hard error in this case.Switching to
cp --reflink=never
fixes the problem.The end result of this is that many automation scripts, e.g. makepkg on Arch Linux, are unusable because of files, because they trigger this error very frequently.
Describe how to reproduce the problem
This example script triggers the issue almost every time:
It is required to run these commands in very quick succession.
Include any warning/errors/backtraces from the system logs
The mentioned script would output:
Nothing can be seen in
dmesg
.The text was updated successfully, but these errors were encountered: