Re: [BUGFIX][PATCH 3/3] configfs: Fix failing symlink() making rmdir() fail

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Louis Rilling
Date: Thursday, June 19, 2008 - 2:28 am

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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUGFIX][PATCH 0/3] configfs: symlink() fixes, Louis Rilling, (Tue Jun 17, 10:37 am)
Re: [BUGFIX][PATCH 3/3] configfs: Fix failing symlink() ma ..., Louis Rilling, (Thu Jun 19, 2:28 am)