From owner-freebsd-fs Tue Feb 6 3: 3:47 2001 Delivered-To: freebsd-fs@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id CEB2037B401; Tue, 6 Feb 2001 03:03:24 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f16B33B33409; Tue, 6 Feb 2001 12:03:03 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Boris Popov Cc: freebsd-arch@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG Subject: Re: vnode interlock API In-Reply-To: Your message of "Tue, 06 Feb 2001 17:00:03 +0600." Date: Tue, 06 Feb 2001 12:03:03 +0100 Message-ID: <33407.981457383@critter> From: Poul-Henning Kamp Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Sounds like something which should have been done long time ago... In message , Boris Popov writes: > 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-arch" in the body of the message > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message