From owner-cvs-all Fri Aug 13 13:46:27 1999 Delivered-To: cvs-all@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 9DDA814C1F; Fri, 13 Aug 1999 13:46:22 -0700 (PDT) (envelope-from julian@whistle.com) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with SMTP id NAA63991; Fri, 13 Aug 1999 13:42:10 -0700 (PDT) Date: Fri, 13 Aug 1999 13:42:54 -0700 (PDT) From: Julian Elischer To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/miscfs/specfs spec_vnops.c src/sys/sys conf.h In-Reply-To: <4648.934574848@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk yes but your example didn't do so... Justin wanted the driver to know about all the closes. On Fri, 13 Aug 1999, Poul-Henning Kamp wrote: > > You havn't looked too closely at the stuff I committed, have you ? > > :-) > > There is no need to add another entry point, open and close does > just fine, all we needed to do was to call close more often. > > Poul-Henning > > In message , Julian Elischer writes: > > > > > >On Fri, 13 Aug 1999, Poul-Henning Kamp wrote: > > > >> > >> I'm not sure I copy you here, (actually I very sure I don't :-) > >> > >> Could you explain what it is that the driver wants to know here ? > > > >The driver in one system I was playing with, needed to know when the last > >writer releasd the device so that the driver could downgrade the device to > >read-only mode. The reason for this was that when this happenned, the > >device would complete an internal back-up of the data, and label the > >backup as 'stable'. > > > >Unless you keep track of all closes and mode changes, you can't do this. > >Also Justin was saying he wnated to do this for some of his own reasons as > >well. > > > >The simplest way to do it would be to add an advisory entrypoint > >that was called for ALL closes, not just the last one, and also when a > >fork happenned as you now have more users. I wasn't too fussed about that > >one, but Justin had some good reasons at the time... > > > >julian > > > >> > >> Poul-Henning > >> > >> In message , Julian Elischer writes: > >> >(yey) > >> >however I discovered in the SLICE code that it woudl be good if the third > >> >operation was: > >> >proc2: close > >> > devsw->modechenge(R/W, 0, proc2 ) > >> > > >> >on fork: > >> >proc2: close > >> > devsw->modechenge(0, R/W, proc2 ) > >> > > >> > > >> > > >> >where the close2() operation is called on all close() operations > >> > > >> >On Fri, 13 Aug 1999, Poul-Henning Kamp wrote: > >> > > >> >> phk 1999/08/13 09:29:28 PDT > >> >> > >> >> Modified files: > >> >> sys/miscfs/specfs spec_vnops.c > >> >> sys/sys conf.h > >> >> Log: > >> >> Add support for device drivers which want to track all open/close > >> >> operations. This allows a device driver better insight into > >> >> what is going on that the current: > >> >> > >> >> proc1: open /dev/foo R/O > >> >> devsw->open( R/O, proc1 ) > >> >> proc2: open /dev/foo R/W > >> >> devsw->open( R/W, proc2 ) > >> >> proc2: close > >> >> /* nothing, but device is > >> >> really only R/O open */ > >> >> proc1: close > >> >> devsw->close( R/O, proc1 ) > >> >> > >> >> Revision Changes Path > >> >> 1.95 +18 -59 src/sys/miscfs/specfs/spec_vnops.c > >> >> 1.72 +3 -2 src/sys/sys/conf.h > >> >> > >> >> > >> >> > >> > > >> > > >> > >> -- > >> 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! > >> > >> > > > > > > -- > 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 cvs-all" in the body of the message