看板 DFBSD_commit 關於我們 聯絡資訊
dillon 2005/02/12 10:56:47 PST DragonFly src repository Modified files: sys/kern vfs_cache.c vfs_subr.c sys/sys namecache.h Log: Fix a cache_resolve() vs cache_inval() race which can result in a livelock. The namecache invalidation code was being a bit overzealous when asked to invalidate a subhierarchy. It was retrying until the subhierarchy was completely invalidated, re-invalidating new entries created after the initial call to cache_inval(). This can occur if the filesystem is heavily loaded and a high level directory is being recursively invalidated. It is unnecessary to retry in this case... the purpose is to invalidate as-of the call to cache_inval(), so it is acceptable to allow new entries to be resolved within the subhierarchy undergoing the invalidation. Certain higher level entities... rename, and vnode reclamation, require complete invalidation. The retry has been moved to a higher level for these entities. The basic cache_inval() code is now single-pass. Reported-by: Richard Nyberg <rnyberg@it.su.se> Revision Changes Path 1.51 +52 -16 src/sys/kern/vfs_cache.c 1.52 +4 -1 src/sys/kern/vfs_subr.c 1.19 +2 -2 src/sys/sys/namecache.h http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_cache.c.diff?r1=1.50&r2=1.51&f=u http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_subr.c.diff?r1=1.51&r2=1.52&f=u http://www.dragonflybsd.org/cvsweb/src/sys/sys/namecache.h.diff?r1=1.18&r2=1.19&f=u