From: Steve French <smfltc@us.ibm.com>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>, linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCEMENT PATCH COW] proof of concept impementation of cowlinks
Date: 11 May 2004 10:40:49 -0500 [thread overview]
Message-ID: <1084290049.5135.11.camel@stevef95.austin.ibm.com> (raw)
In-Reply-To: <20040511100232.GA31673@wohnheim.fh-wedel.de>
It would not be helpful to take a userspace request to perform a file
(or directory) copy operation and break it into open/sendfile/close by
passing file handles to the network filesystem and have this work for
SMB/CIFS - there is no equivalent network protocol operation. It also
makes the operation much, much harder to make atomic (since two systems
are involved) and makes error handling and recovery for network
filesystems much harder since inconsistent client and server state have
to be considered if the copy operation is broken into pieces on the
clien (it is also slower - a single copy operation on the network is the
absolute optimal case - minimizes the expensive network latency - the
roundtrip delay - open/sendfile/close sends at a minimum three times as
many but likely four with an extra lookup or two)
Currently copy file (or copy directory for that matter) as both speced
(and is implemented in various servers) in the SMB/CIFS network
filesystem protocol takes in effect four parameters (there is no handle
based file copy):
a source pathname, and source export (actually SMB tree identifier for
a share, but in effect the same thing)
a target pathname, and target export (actually SMB tree identifier for a
share, but in effect the same thing)
And the shares (exports) referenced have to be on the same server
Trying to ignore the 1st file open
On Tue, 2004-05-11 at 05:02, Jörn Engel wrote:
> On Mon, 10 May 2004 15:26:02 -0400, Jan Harkes wrote:
> > On Mon, May 10, 2004 at 05:53:59PM +0200, Jörn Engel wrote:
> > > A real problem is that copyfile() has all errno's from create(),
> > > sendfile() and unlink() combined, which doesn't make error handling in
> > > userspace easy. "It could be this, that or another error" is the kind
> > > of mess I always hated about Windows, so I should try to do a little
> > > better.
> >
> > Well, if you leave the create and unlink up to the application and
> > simply pass open filedescriptors to copyfile... But then it would be
> > equivalent to your new sendfile.
> >
> > 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.
>
> Jörn
next prev parent reply other threads:[~2004-05-11 15:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-06 13:17 Jörn Engel
2004-05-06 13:18 ` [PATCH COW] generic_sendpage Jörn Engel
2004-05-06 13:19 ` [PATCH COW] sendfile Jörn Engel
2004-05-06 13:19 ` [PATCH COW] copyfile Jörn Engel
2004-05-06 13:20 ` [PATCH COW] lock_flags Jörn Engel
2004-05-06 13:21 ` [PATCH COW] MAD COW Jörn Engel
2004-05-08 13:45 ` [ANNOUNCEMENT PATCH COW] proof of concept impementation of cowlinks Denis Vlasenko
2004-05-08 22:10 ` Pavel Machek
2004-05-09 14:09 ` Denis Vlasenko
2004-05-09 21:53 ` Pavel Machek
2004-05-10 15:44 ` Jörn Engel
2004-05-10 15:51 ` Pavel Machek
2004-05-10 15:56 ` Jörn Engel
2004-05-12 0:26 ` Jamie Lokier
2004-05-13 10:56 ` Jörn Engel
2004-05-12 20:29 ` Rob Landley
2004-05-08 22:48 ` Pavel Machek
2004-05-10 15:53 ` Jörn Engel
2004-05-10 19:26 ` Jan Harkes
2004-05-11 10:02 ` Jörn Engel
2004-05-11 14:08 ` Jan Harkes
2004-05-11 14:18 ` Jan Harkes
2004-05-11 14:33 ` Jörn Engel
2004-05-21 23:23 ` Rob Landley
2004-05-25 22:46 ` Jan Harkes
2004-05-11 15:40 ` Steve French [this message]
2004-05-11 15:58 ` Jörn Engel
2004-05-10 5:15 ` Eric W. Biederman
2004-05-10 15:59 ` Jörn Engel
2004-05-12 16:39 ` Rob Landley
2004-05-20 13:49 ` Pavel Machek
2004-05-25 21:55 ` Rob Landley
2004-05-25 22:08 ` Pavel Machek
2004-05-25 23:16 ` Rob Landley
2004-05-26 0:16 ` Ian Stirling
2004-05-26 9:52 ` Jörn Engel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1084290049.5135.11.camel@stevef95.austin.ibm.com \
--to=smfltc@us.ibm.com \
--cc=jaharkes@cs.cmu.edu \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®