Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 1999 08:47:34 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Greg Lehey <grog@lemis.com>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, FreeBSD Hackers <hackers@FreeBSD.ORG>, FreeBSD Committers <cvs-committers@FreeBSD.ORG>, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Subject:   Re: Mandatory locking? 
Message-ID:  <7324.935390854@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 23 Aug 1999 15:28:49 %2B0930." <19990823152849.H83273@freebie.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <19990823152849.H83273@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.

All you need to do to recover you index then is to have an
ioctl which will read one sector at a time, mark the buffer
dirty write it out again.

I have seen sources for two well-respected RAID-5 products
which do it this way.

>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...

--
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7324.935390854>