[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rename(), wapbl and deadlock
On Thu, Dec 17, 2009 at 10:29:13PM +0100, Manuel Bouyer wrote:
> I got a look again at the ufs_rename patch that David Holland sent
> at the end of september, and managed to get it working on netbsd-5.
> Changes from his version (apart from the backport) that got it working:
> - VOP_UNLOCK(ap->a_tvp) on entry, if not NULL. it's not used and we'll
> do a lookup() to find it again.
> - clear SAVESTART from from_name and to_name. otherwise relookup() will
> VREF() the vnodes and we'll have a refcount leak (and so a vnode
> - make sure to always vrele(illegal_vnode).
> but using the wapbl rename version for the non-wapbl seems to run stable.
> I've not analysed whenever this is safe in case of crash though (and
> won't say I can do it, I don't understand all what's going on in there).
I found a problem with this patch: rename fail with EPERM if the
file is not writable; even though the directory is. This is a change
horn.soc.lip6.fr:/mnt/src/tooldir.NetBSD-5.0_STABLE-i386/bin>chmod 555 truc
horn.soc.lip6.fr:/mnt/src/tooldir.NetBSD-5.0_STABLE-i386/bin>mv truc machin
mv: rename truc to machin: Permission denied
I don't know yet what is the cause for this
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
Main Index |
Thread Index |