Rename on underlying file-system results in I/O error via kernel.
[included linux-fsdevel in CC]
Quoted 4 lines
So, from what I can see, the lookup will result in finding the existing inode pointer. Is there a need to invalidate the previous directory alias?
How could I create a directory loop now?
You can create a loop with the rename() system call by moving a directory into a subdirectory of itself.
Normally this is prohibited by the VFS, but once you have directory aliases, you can do a rename that does not look like it would create a loop.
For example if "b/a" and "c/a" are aliases of the same directory, then doing rename("b/a", "c/a/d/a") would create a loop.
You can also create a loop with with lookup:
Local: cd a/b Remote: mv a/b b Remote: mv a b/a Local: ls a
Now locally "a" and "a/b/a" are aliases which means you have a loop.
The problem with directory loops is that locking rules are no longer enforced, and two parallel operations may deadlock.
All this is very unlikely to happen accidentaly, but even so filesystem deadlocks are not nice.
Miklos
-------------------------------------------------------------------------
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