here's a patch, based on the algorithm, shrinks
unionfs_rename_whiteout() tremendously.
small tests seem to work correctly, the regression suite obviously fails
as the algorithm has changed (i.e. if not leftmost, we copyup, even
branch is rw.
Josef Sipek wrote:
On Fri, Jan 19, 2007 at 02:52:12PM -0500, Shaya Potter wrote:
why not
if (branch(old_dentry) != left_most)
copyup();
vfs_rename(old_dentry, new_dentry);
create_whiteout(old_dentry);
I'm thinking of something more like this:
if (is_ro_branch(old))
copyup_to_left_most();
vfs_rename(old,new);
create_wh(old);
This way, we copyup only when we have to.
would seemingly simplify it a lot, negative is that a rename() would
create a copy even if source is on a rw branch.
Just changing the condition can prevent a number of copyups, while keeping
the code sane.
The question is rename() more similar to a "file modification" or a file
creation/unlink. if it's the former, the current hoops make some sense,
if it's the latter, the simplified version would seemingly make more sense.
I have no problem trying this out in the lkml code. I'm not quite ready to
break the 1.x semantics as some people depend on them.
Shaya, If you can make a patch, I'll add it to the code to push to Andrew.
I'm not sure when I'll get to do it myself...classes just started again, and
I'm trying to battle the page cache :)
Jeff.
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs