lkml.org 
[lkml]   [2003]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: OT: why no file copy() libc/syscall ??
Rogier Wolff wrote:
> On Mon, Nov 10, 2003 at 08:05:11PM -0500, Albert Cahalan wrote:
>
> long copy_fd_to_fd (int src, int dst, int len)
>
> The kernel then becomes something
>
> if (islocalfile (src) && issocket (dst))
> /* Call the old sendfile */
> return sendfile (....);
>
> if (isCIFS (src), isCIFS(dst))
> /* Tell remote host to copy the file. */
> return CIFS_copy_file (....);
>

B.S.

>
> But alas, last time Linus didn't agree with me and decided we should
> do something like "sendfile", which is IMHO just a special case of
> this one.
>

I will reply on behalf of Linus: "Send patch!"

I beleive you are not developer - so you even cannot estimate what
you are proposing.

This kind of patch will never be accepted.

Just try to imagine: 20 file systems, so 20*20 == 400 ifs?

So I beleive you will get more more positive responses, If you will
start improveing vfs, e.g. adding generic routines for optimized move of
file from one file system to another, with API which allow it to
extrapolate nicely to networked file systems.
Since right now there is no way to pass file from one fs to another -
so basicly this thread is already, well, over ;-)

>
> If we implement this in kernel (at first just the copy_fd_fd and the
> default implementation), then we can get "cp" to use this, and then
> suddenly whenever we upgrade the kernel, cp can use the newly
> optimized copying mechanism. (e.g. whenever we manage to specify a
> socket as the destination, cp would suddenly start to use
> "sendfile"!!)
>

Silly. cp is least frequent application I use.
And cvs I beleive already uses sendfile().
So all your /arguments/ go directly into /dev/null, since if file is
not in cvs - you know - it just doesn't exist ;-)))

>
> Roger.
>


--
Ihar 'Philips' Filipau / with best regards from Saarbruecken.
-- _ _ _
"... and for $64000 question, could you get yourself |_|*|_|
vaguely familiar with the notion of on-topic posting?" |_|_|*|
-- Al Viro @ LKML |*|*|*|

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.053 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site