Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 1999 13:52:12 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Christopher Masto <chris@netmonger.net>, Chuck Robey <chuckr@picnic.mat.net>
Cc:        "Daniel C. Sobral" <dcs@newsguy.com>, Greg Lehey <grog@lemis.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>, 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:  <v04210109b3e88b28cccc@[128.113.24.47]>
In-Reply-To: <19990823232726.B16133@netmonger.net>
References:  <19990823231130.A16133@netmonger.net> <Pine.BSF.4.10.9908232313540.49952-100000@picnic.mat.net> <19990823232726.B16133@netmonger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:27 PM -0400 8/23/99, Christopher Masto wrote:
>On Mon, Aug 23, 1999 at 11:16:21PM -0400, Chuck Robey wrote:
> > What has that code you show above got to do with mandatory locking?
> > You completely missed the explicit locking calls that you have to make,
> > to get and release the locks.  If you don't make the call, and you have
> > madatory locking, then your process will sleep until someone else
> > releases the lock;
>
>Exactly.  You said that mandatory locking means that user A's correct
>use of locking means that user B doesn't have to be careful.  That's
>not the case, since A can step in between B's read and write.  A's
>mandatory lock doesn't help.
>
>I don't see the use for it.

Then don't use it.  There is one thing about this discussion that you
seem to be missing.  We are not talking about mandatory locking for
*all* files.  Only for files where mandatory locking is explicitly
requested.  If you don't have a use for mandatory locking, then do not
go out of your way to turn it on for the files you are using.

We are just saying that if some developer does want to use mandatory
locking, it would be nice if FreeBSD provided that as an option.  And
as an option which doesn't require writing special daemons and other
tricks just to make sure that programs have to lock the file.

Not sure if you were at RPI in the days of MTS, but mandatory locking
certainly does come in handy in some cases.


---
Garance Alistair Drosehn           =   gad@eclipse.acs.rpi.edu
Senior Systems Programmer          or  drosih@rpi.edu
Rensselaer Polytechnic Institute


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