Both copy_file_range() and copy_fallback() can be interrupted before
they have read anything at all, in which case they return -1 and set
errno to EINTR. If that happens, we should retry, not fail.
MFC after: 1 week
PR: 293028
Differential D55167
cp: Expect EINTR while copying Authored by des on Sat, Feb 7, 5:34 PM. Tags None Referenced Files
Subscribers
Details
Both copy_file_range() and copy_fallback() can be interrupted before MFC after: 1 week
Diff Detail
Event TimelineComment Actions This is probably correct. However, I'd like to see two other things:
Comment Actions The reproducing case is timing dependent. I came up with the discrepancy when a user on the forums interrupted a cp operation with a du and cp bailed out. I will troll the base system for similar cases. Comment Actions Do you at least know what fuse file system he was using, and what options it was mounted with? Comment Actions NTFS uses libfuse-2. That version doesn't even support FUSE_COPY_FILE_RANGE. So my guess is that vn_copy_file_range did one read and then one write. The write went through fuse_vnop_write, but then it blocked, because the FUSE daemon was processing other commands. So no FUSE_WRITE operation ever got sent to userspace. Then something sent a signal to the process. So the fusefs module abandoned the write operation, returning EINTR, and vn_copy_file_range faithfully returned it to userspace. |