On Wed, Jun 18, 2008 at 01:11:07PM -0700, Joel Becker wrote:
rotects
e link to
Because
1/ setting and clearing ATTACHING could badly interact with mkdir()/symlink=
()
inside the target item (for instance clear the flag before mkdir() has fini=
shed
attaching a new item); to avoid this we could use a different flag, but
2/ rmdir() of the target cannot lock the inode of the new symlink's parent =
like
it does for mkdir(), otherwise we would risk a deadlock with other symlink(=
) and
sys_rename(). This means that rmdir() should retry aggressively, in a busy
waiting loop, or replacing mutex_lock()/mutex_unlock() with yield().
lback the
In the case of symlink(), building a new inode is what all filesystems must=
do.
The only "bad" side-effect I can figure out of having to rollback is that t=
he
new entry will be visible for a short time until it is removed.
Anyway, do you think that the "solutions" above are more acceptable?
d above,
the
See above the reasons for not using ATTACHING on the target.
Louis
--=20
Dr Louis Rilling Kerlabs
Skype: louis.rilling Batiment Germanium
Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes
http://www.kerlabs.com/ 35700 Rennes