"Simon Sasburg":
> none                 /home/simon/.stuff.aufs    aufs
> br:/home/simon/.stuff.local=rw:/windows/C/Stuff=rw:/windows/D/Stuff=rw:/windows/E/Stuff=rw
> 0 0
> 
> I have a file /windows/C/Stuff/File.txt, and it also appears in
> /home/simon/.stuff.aufs/File.txt
> now when i do (in /home/simon/.stuff.aufs/) :
> $mv File.txt File2.txt
> instead of moving /windows/C/Stuff/File.txt to
> /windows/C/Stuff/File2.txt, it creates .wh.File.txt and File2.txt in
> /home/simon/.stuff.local/
> 
> Is this normal? is there anything i can do to make it do a 'proper' rename?

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.

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.

If the rename target file /windows/C/Stuff/File2.txt existed already,
the rename would be done under /windows/C/Stuff and the whiteout would
not be created under the first branch. This is not the case of 'creata a
file newly.'

If the file was /windows/C/Stuff/brabra/File.txt and
/home/simon/.stuff.local/brabra dir didn't exist, also the rename would
be done under /windows/C/Stuff/brabra.

And you will know the messages in your dmesg are not related to this
issue, if you read the aufs manual.


Junjiro Okajima

-------------------------------------------------------------------------
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