Re: [ANNOUNCEMENT PATCH COW] proof of concept impementation of cowlinks
From: Jörn Engel
Date: Tue May 11 2004 - 09:35:35 EST
On Tue, 11 May 2004 10:08:53 -0400, Jan Harkes wrote:
> On Tue, May 11, 2004 at 12:02:32PM +0200, Jörn Engel wrote:
> > > Copyfile can trivially be implemented in libc. I don't see why it would
> > > have to be a system call. If a network filesystem wants to optimize the
> > > file copying it could do this based on the sendfile data. If source and
> > > destination are within the same filesystem and we're copying the whole
> > > file starting at offset 0, send a copyfile RPC.
> > Can you explain this to Steve? I'm still quite clueless about network
> > filesystems, but it sounded as if such an optimization was impossible
> > to do in cifs without a combined create/copy/unlink_on_error system
> > call.
> > If your suggestion works and the network filesystems can be changed to
> > work independently of a struct file*, I agree with you that copyfile()
> > is a stupid idea and should be forgotten.
> I would probably do it by overriding the file_operations.sendfile
> function. A first approximation of a possible implementation follows. I
> went a bit crazy on the comments. The only problem is that the type of
> target is unknown, block/loop.c and nfsd/vfs.c are using sendfile to
> to send to something that is not a struct file.
Looks as if it could work. Steve, can you verify this?
A surrounded army must be given a way out.
-- Sun Tzu
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/