> Basically, yes it is normal.
> The question is which branch will a new file be created. And the answer
> is it depends on which branch is writable, and which branch the parent
> dir exists on.
Well in my case all branches are writable, and the parent dir exists
on all branches (it has to, because the dir is the 'root' of the
union).

> In your case, the parent directory is /home/simon/.stuff.local or
> /windows/C/Stuff and aufs decides to use the first one,
> eg. /home/simon/.stuff.local.
> This algorithm is effective, since the dentry (the first one) is given
> to aufs by VFS and aufs is no need to lookup operation. What aufs does
> is a simple copyup.
Well, it may be effective, but IMHO it is far from optimal. Moving a
file within 1 filesystem is an operation that costs nearly nothing
usually, while moving a file across file systems can be very expensive
as it has to actually move all the data, this becomes especially
problematic with larger files.

In addition, the creation of the whiteout instead of just deleting the
file (why does it do this? its on a writeable branch, why white it
out?) is wasting space, this again becomes more problematic with
larger files.

Now i know making rename/move more 'optimal' will probably make it
quite a bit more complex to handle all the cases it needs to, but it
may be something to think about or put on a todo list somewhere?

By the way, i just tested unionfs, and it does keep a file on its own
branch during a move/rename, at least when the targets parent dir
exists on that branch, so it is possible to do this, it seems. This
issue may be something to mention in the "Compatible/Incompatible with
Unionfs" part of the manual too?

Simon Sasburg

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Reply via email to