file_unix: optimize copy

Merged Méven Car requested to merge (removed):bug-458001 into master
  • avoid to stat the source file to get its size in the loop

BUG: 458001

In dolphin: This allows my local SSD to copy at 300+ MB/s large files at cold start. And my nfs mount copy jumps from ~10MB/s to 30-40MB/s.

cc @ahmadsamir @dfaure

Edited by Méven Car

Merge request reports