Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: [yamt-nfs-mp] src/sys

On Wed, Jun 24, 2009 at 09:24:57PM -0700, Bill Stouder-Studenmund wrote:
> > > 
> > > The fact that the caller has a reference to the vnode at all should
> > > really be enough, surely??
> > 
> > do you mean vref?
> > it doesn't prevent revoke(2).
> > thus a filesystem can't access v_data safely.

If revoke works by changing fields of the vnode (like v_data) then
it is always going to cause grief - since v_data can then disappear
during the entry of any VOP call.

In a single-threaded, non-smp, kernel the data areas can probably be
changed in a consistent manner. With SMP you have to do things
differently.  So if revoke is making the vnode reference some other
(dummy) fs and then releasing all references to the original fs, it
just isn't going to work.

> How does Solaris do this? My understanding is you _don't_ have to lock 
> nodes any where near as often as we do (or did last I looked, which was 
> admittedly a while ago).

FWIW SYSV handled controlling terminal 'revoke' by disallowing access
to the major/minor in the specfs code.  So even if you did another open()
you couldn't access the device that had been your ctty. (Which was rather
fun when the ctty was a clone device from the network stack, and the
program was a network daemon.)


David Laight:

Home | Main Index | Thread Index | Old Index