Messages in this thread |  | | | Date | Tue, 7 Sep 2004 16:51:18 +0200 | | From | Jörn Engel <> | | Subject | Re: [PATCH 4/4] copyfile: copyfile |
| |
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 - 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/
|  |