From owner-freebsd-hackers Sat Aug 28 17:32: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id E79C114DED for ; Sat, 28 Aug 1999 17:31:59 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id KAA21819; Sun, 29 Aug 1999 10:01:51 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id KAA64978; Sun, 29 Aug 1999 10:01:49 +0930 (CST) Date: Sun, 29 Aug 1999 10:01:49 +0930 From: Greg Lehey To: Peter Dufault Cc: hackers@FreeBSD.org, commit@freebie.lemis.com Subject: Re: locking revisited Message-ID: <19990829100149.M13904@freebie.lemis.com> References: <19990828125241.G13904@freebie.lemis.com> <199908281916.PAA09116@hda.hda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199908281916.PAA09116@hda.hda.com>; from Peter Dufault on Sat, Aug 28, 1999 at 03:16:28PM -0400 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Saturday, 28 August 1999 at 15:16:28 -0400, Peter Dufault wrote: >> As a result, I argue that we should implement locking. The questions >> are: how? I'd suggest three methods which can be individually enabled >> via sysctls: >> >> - System V style. We need this for compatibility with System V. The >> choice of mandatory or advisory locking depends on the file >> permissions. >> >> - Only mandatory locking. fcntl works as before, but locks are >> always mandatory, not advisory. I'm sure that this won't be >> popular, at least initially, but if you don't like it, you don't >> have to use it.y >> >> - Via separate calls to fcntl. fcntl currently has the following >> command values: >> >> #define F_DUPFD 0 /* duplicate file descriptor */ >> #define F_GETFD 1 /* get file descriptor flags */ >> #define F_SETFD 2 /* set file descriptor flags */ >> #define F_GETFL 3 /* get file status flags */ >> #define F_SETFL 4 /* set file status flags */ >> #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ >> #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ >> #define F_GETLK 7 /* get record locking information */ >> #define F_SETLK 8 /* set record locking information */ >> #define F_SETLKW 9 /* F_SETLK; wait if blocked */ >> >> We could add a F_SETMANDLOCK or some such. >> >> Any thoughts? > > (I'm following up only on -hackers because I personally hate discussions > in -commit.) I'm copying -commit because that's where we're supposed to discuss these things. I made the mistake of excluding them once before, and the results were painful. > 1. Isn't vinum a device? Yes. > Isn't this file-level locking irrelevant? To Vinum, yes. > Shouldn't all locking for maintenance be done at the device level? Maybe. Depends on what kind of maintenance you're doing. What happens if you want to dd one plex to another? You've missed another message of mine, where I said that this issue has no relevance to Vinum. > 2. I'll bet there are some standards, at least in development. Have you > done a few searches? Sure. The important one was in the attachment: System V has a standard. > I have other opinions, some that I hold strongly, but since they > have to do with lack of definition of boundary conditions then I > won't bring them up until (2.) is answered. Go for it. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message