Bug 14795 - copy_file_range() may fail with EOPNOTSUPP
Summary: copy_file_range() may fail with EOPNOTSUPP
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 15:54 UTC by Ralph Böhme
Modified: 2021-08-26 09:25 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.15 cherry-picked from master (3.92 KB, patch)
2021-08-13 14:09 UTC, Ralph Böhme
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2021-08-12 15:54:26 UTC
When building in a RHEL 7 container on a RHEL 8 host, the current configure check will detect a working SYS_copy_file_range() syscall.

Later when the resulting smbd binary is run in a RHEL 7 container on a RHEl 7 (vs 8 on the build host) host, SYS_copy_file_range() will fail with EOPNOTSUPP.

We have to catch this in vfs_default and fallback to userspace copy in that case.
Comment 1 Samba QA Contact 2021-08-13 11:46:04 UTC
This bug was referenced in samba master:

c25f72f401842a18cab1db2bab89deec78274d93
1641e6c528e027dbfff96a834b94a8654a03a168
Comment 2 Ralph Böhme 2021-08-13 14:09:00 UTC
Created attachment 16736 [details]
Patch for 4.15 cherry-picked from master
Comment 3 Jule Anger 2021-08-16 06:48:56 UTC
Pushed to autobuild-v4-15-test.
Comment 4 Samba QA Contact 2021-08-16 07:40:03 UTC
This bug was referenced in samba v4-15-test:

681675b68c5dbbb4089067b2db9f11d69b2d085c
7c8ba49b2e9d963deccdea5bc16a8f43e1ce9fcf
Comment 5 Jule Anger 2021-08-17 07:23:51 UTC
Closing out bug report.

Thanks!
Comment 6 Samba QA Contact 2021-08-26 09:25:14 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.0rc3):

681675b68c5dbbb4089067b2db9f11d69b2d085c
7c8ba49b2e9d963deccdea5bc16a8f43e1ce9fcf