Re: File copy system call proposal

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Mon, 10 Dec 2001 18:44:43 MET-1


On 10 Dec 01 at 16:19, Daniel Phillips wrote:
> On December 10, 2001 06:44 am, Albert D. Cahalan wrote:
> >
> > 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).

> > 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
vandrove@vc.cvut.cz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/