Date: Sun, 27 Apr 1997 19:44:46 +0900 From: KATO Takenori <kato@eclogite.eps.nagoya-u.ac.jp> To: dfr@nlsystems.com Cc: kato@eclogite.eps.nagoya-u.ac.jp, CVS-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-sys@FreeBSD.org Subject: Re: cvs commit: src/sys/miscfs/union union_vnops.c Message-ID: <199704271044.TAA03480@gneiss.eps.nagoya-u.ac.jp> In-Reply-To: Your message of "Sat, 26 Apr 1997 19:06:50 %2B0100 (BST)" References: <Pine.BSF.3.95q.970426190247.346D-100000@herring.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
From: Doug Rabson <dfr@nlsystems.com> Subject: Re: cvs commit: src/sys/miscfs/union union_vnops.c Date: Sat, 26 Apr 1997 19:06:50 +0100 (BST) > I don't think this is right. I just had a lockmgr panic using the 1.28 > version of this file (the one which played with the flags). It turned out > that update had the uppervp locked and the union node should have locked > the uppervp itself which would have waited until update had finished > before continuing. In the same situation for 1.29 we would not lock > uppervp at all which just seems wrong. I will undo 1.29. I will replace 1.28 with new change after I make new fix. I consider that the problems related to 1.28 are that (1) 4.4BSD-Lite2 assumes that vn_lock (or VOP_LOCK) is not called after VOP_UNLOCK in same vnode related function. (2) Vnode operations in FreeBSD sometimes call vn_lock after VOP_UNLOCK(). VOP_UNLOCK() keep upper vnode locked and clear UN_ULOCK flag when UN_KLOCK is set in union_unlock. The vn_lock after VOP_UNLOCK calls union_lock, and uppervp is locked because UN_ULOCK is not set. My current idea is that: (1) union_unlock: do not clear uppervp, clear UN_ULOCK flag (same as current), and do not clear UN_KLOCK, when UN_KLOCK is set. (2) union_lock: do not access upper vp, do not clear UN_KLOCK, do not panic, when UN_KLOCK is set. (3) Each function in which UN_KLOCK is set should explicitly clear UN_KLOCK after calling vnode related functions. ---- KATO Takenori <kato@eclogite.eps.nagoya-u.ac.jp> Dept. Earth Planet. Sci., Nagoya Univ., Nagoya, 464-01, Japan PGP public key: finger kato@eclogite.eps.nagoya-u.ac.jp ------------------- Powered by FreeBSD(98) -------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704271044.TAA03480>