From owner-freebsd-fs Tue Feb 6 3: 0:30 2001 Delivered-To: freebsd-fs@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id 5817737B503; Tue, 6 Feb 2001 03:00:08 -0800 (PST) Received: by relay.butya.kz (Postfix, from userid 1000) id BAE6628E66; Tue, 6 Feb 2001 17:00:03 +0600 (ALMT) Received: from localhost (localhost [127.0.0.1]) by relay.butya.kz (Postfix) with ESMTP id ABBCA28E46; Tue, 6 Feb 2001 17:00:03 +0600 (ALMT) Date: Tue, 6 Feb 2001 17:00:03 +0600 (ALMT) From: Boris Popov To: freebsd-arch@freebsd.org Cc: freebsd-fs@freebsd.org Subject: vnode interlock API Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, Few months ago simple locks used for vnode interlock were replaced by mutexes. It causes additional pain for externally maintained filesystems and lowers portability of the code between -stable and -current. So, I suggest to introduce two macro definitions which will hide implementation details for interlocks: #define VI_LOCK(vp) mtx_enter(&(vp)->v_interlock, MTX_DEF) #define VI_UNLOCK(vp) mtx_exit(&(vp)->v_interlock, MTX_DEF) for RELENG_4 they will look like this: #define VI_LOCK(vp) simple_lock(&(vp)->v_interlock) #define VI_UNLOCK(vp) simple_unlock(&(vp)->v_interlock) Any comments, suggestions ? -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message