File copy system call proposal
Quoted 11 lines · Daniel Phillips
Quoted 4 lines · Albert D. Cahalan
No, mmap+write does not do the job. SMB file servers have a remote copy operation. There shouldn't be any need to pull data over the network only to push it back again!
Hi Albert,
I don't get it, you're saying that this zero-copy optimization, which happens entirely within the vfs, shouldn't be done because smb can't do it over a network?
VFS can do this optimization (but why...), but having FS-specific sendfile would be nice too - FS can verify whether both source & destination are on same filesystem, and if they do, it can perform server filecopy (if server's implementation filecopy can copy arbitrary long chunk at arbitrary offset into another file at some else offset, like Netware's NWFileServerFileCopy() does).
Quoted 4 lines
Quoted 1 line
trustees (NetWare)
I'd think the mmap-based copy would only use the technique on the data portion of a file.
At least from my exprience with Netware I can say that copy which copies file trustees happens in at most 1% of all copies (and on Netware trustees flow through the tree down, so you have usually no trustees assigned to leaf files) - and this 1% is when you do backup and restore. In all other cases it would be great surprise that all users which had rights to old copy have these rights to new copy too.
Best regards,
Petr Vandrovec [email protected]