From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, Steve French <smfltc@us.ibm.com>
Subject: Re: [PATCH 4/4] copyfile: copyfile
Date: Tue, 7 Sep 2004 16:51:18 +0200 [thread overview]
Message-ID: <20040907145118.GA29993@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0409070656150.2299@ppc970.osdl.org>
On Tue, 7 September 2004 07:06:00 -0700, Linus Torvalds wrote:
>
> Then you could (and should) make a "generic_file_copy()" function that
> takes that pathname format, and then uses sendfile() to do the copy for
> regular disk-based filesystems.
Does that mean that you're ok with the first three patches?
> I think you should be able to copy the "sys_link()" code for almost all of
> the top-level stuff. The only real difference being
>
> - error = dir->i_op->link(old_dentry, dir, new_dentry);
> + error = dir->i_op->copy(old_dentry, dir, new_dentry);
>
> or something.
ok.
> And no, I don't know how to handle interruptability.
How about the loop in 3/4?
> I think the right
> answer may be that filesystems that don't support this as a "native op"
> and can't do it quickly should just return an error, and then users can
> copy their multi-gigabyte files by hand, like they used to.
>
> So if we do this, we do this _right_. We also make sure that we error out
> "too much" rather than "too little", so that people don't start depending
> on behaviour that we don't want them to depend on.
Makes sense, as long as any disk filesystem can decide to add a
one-liner like
.copy = generic_file_copy;
to their operations and explicitly allow this. Cowlinks remain my pet
project, even if I get distracted by Real Work sometimes. Without
some form of in-kernel copy, they'd be dead in the water.
Jörn
--
Fantasy is more important than knowledge. Knowledge is limited,
while fantasy embraces the whole world.
-- Albert Einstein
next prev parent reply other threads:[~2004-09-07 15:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-07 12:09 [PATCH 1/4] copyfile: generic_sendpage Jörn Engel
2004-09-07 12:11 ` [PATCH 2/4] copyfile: sendfile Jörn Engel
2004-09-07 12:12 ` [PATCH 3/4] copyfile: sendfile_loop Jörn Engel
2004-09-07 12:15 ` [PATCH 4/4] copyfile: copyfile Jörn Engel
2004-09-07 14:06 ` Linus Torvalds
2004-09-07 14:19 ` Anton Altaparmakov
2004-09-07 14:51 ` Jörn Engel [this message]
2004-09-07 14:59 ` Linus Torvalds
2004-09-07 15:21 ` Jörn Engel
2004-09-07 15:28 ` Linus Torvalds
2004-09-09 15:04 ` Herbert Poetzl
2004-09-08 17:09 ` Steve French
2004-09-07 15:32 ` [PATCH 1/4] copyfile: generic_sendpage David Woodhouse
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=20040907145118.GA29993@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smfltc@us.ibm.com \
--cc=torvalds@osdl.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®