Date: Fri, 25 Aug 2006 06:47:50 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Julian Elischer <julian@elischer.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov <kib@FreeBSD.org>, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 lock.9 Message-ID: <20060825064512.D38856@fledge.watson.org> In-Reply-To: <44EE0906.40705@elischer.org> References: <200608241016.k7OAG1VE058083@repoman.freebsd.org> <44EE0906.40705@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Aug 2006, Julian Elischer wrote: > Konstantin Belousov wrote: > >> kib 2006-08-24 10:16:01 UTC >> >> FreeBSD src repository >> >> Modified files: (Branch: RELENG_6) >> share/man/man9 lock.9 Log: >> MFC rev.1.14: >> Note that LK_UPGRADE may drop the shared lock before taking the >> exclusive one. >> > excuse my ignorance but I though that the whole aim of an upgrade was to > make sure that you did NOT drop it before getting the exclusive lock..( or > it fails and you back out and retry) This is a feature and a bug. :-) In order to avoid deadlock on upgrade, one of two things must happen: - The upgrade must be able to fail -- i.e., sx(9)'s sx_try_upgrade(). - A race must be introduced in which the shared lock is released before an exclusive lock is acquired -- i.e., lockmgr(9)'s LK_UPGRADE. Consumers of lockmgr(9) -- specifically, VFS, are aware of this. Documenting it is good, however. :-) Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060825064512.D38856>