From owner-freebsd-hackers Mon Aug 23 0:52: 7 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 78BB314D30; Mon, 23 Aug 1999 00:51:53 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id JAA07571; Mon, 23 Aug 1999 09:47:40 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Greg Lehey Cc: Matthew Dillon , FreeBSD Hackers , FreeBSD Committers , Garrett Wollman Subject: Re: Mandatory locking? In-reply-to: Your message of "Mon, 23 Aug 1999 16:28:13 +0930." <19990823162813.I83273@freebie.lemis.com> Date: Mon, 23 Aug 1999 09:47:40 +0200 Message-ID: <7569.935394460@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <19990823162813.I83273@freebie.lemis.com>, Greg Lehey writes: >>>> Why should it be made unavailable ? >>> >>> So that certain multiple accesses can be done atomically. >> >> You don't need that. You initialize a index to 0, and whenever the >> sector with that index is written, you increment it. >> >> At any one time you know that all parityblocks <= your index >> are valid. > >Sure, that's pretty much what I do in the situation you're thinking >about. But it won't work without locking. Take a look at >vinumrevive.c and vinumrequest.c. I still don't see the need for mandatory locking, or locking out user access in general... >>> I'm a little surprised that there's any objection to the concept of >>> mandatory locking. >> >> Too many of us have had wedged systems because of it I guess... > >Strange, I've probably used it more than anybody here, and I've never >had a wedged system. Of course, you need to use it appropriately. >'rm' can be a lethal tool :-) Well, maybe you were more lucky, I've had my share of troubles, and I think the very concept stinks... -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message