bruns added a comment.
In D17737#381354 <https://phabricator.kde.org/D17737#381354>, @chinmoyr wrote: > In D17737#381029 <https://phabricator.kde.org/D17737#381029>, @bruns wrote: > > > I think it would be much simpler if you just tried to do the the FICLONE iotctl in the job, without any prior checking: > > > > - no possibility for races > > - less syscals > > - less code > > > I am not sure I followed you here. To me ioctl seems to naturally fit in FileProtocol::copy(). Can I ask you to elaborate a bit? I meant scrap everything but the changes from file_unix.cpp. Worst case - the ioctl fails (for whatever reason). That is one additional ioctl/syscall. The probing code using KMountPoint::List::findByPath internally creates a QFileInfo, thus does a stat (syscall) as well. Best case - the ioctl succeeds. You save the syscall required for the probing. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D17737 To: chinmoyr, dfaure, davidedmundson Cc: bruns, kde-frameworks-devel, michaelh, ngraham