Source-Changes archive

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

Re: CVS commit: src/sys



On Tue, Dec 27, 2005 at 05:20:26PM -0800, Bill Studenmund wrote:
> On Tue, Dec 27, 2005 at 03:54:15PM -0800, Chuck Silvers wrote:
> > On Tue, Dec 27, 2005 at 03:37:58PM -0800, Bill Studenmund wrote:
> > > On Tue, Dec 27, 2005 at 02:49:24PM -0800, Chuck Silvers wrote:
> > > > I'm also suspicious of this change.  this change doesn't seem related
> > > > to the purpose given in the check-in comment, is it?  if you really want
> > > > to reduce the amount of duplicate code, why not just split it into
> > > > multiple functions?
> > > 
> > > A separate checkin might have been good. However at this point, a "cvs 
> > > admin -m" will probably be enough to fix things up. I agree we should 
> > > note 
> > > this change, but I don't think it's so bad to include it.
> > 
> > if the purpose is to reduce the amount of duplicate code, why not just split
> > the function into multiple functions rather than changing the requirements
> > of VOP_INACTIVE() in subtle ways?
> 
> I'm sorry, I don't think it is changing the semantics of VOP_INACTIVE(). 
> It took me a while to figure that out, but the only times one of these 
> vrele()s would call VOP_INACTIVE() is: 1) if the vnode were revoked, in 
> which case we send the call is handed by deadfs. 2) if the vnode has been 

Sorry, that should have been "in which case we send the call to deadfs".

> reused and the reusing thread has already called vrele(). In the latter 
> case, we _should_ call VOP_INACTIVE(), as the new user has let the vnode 
> go back onto the free list. In the former case, I think we will do the 
> same call to deadfs we would do otherwise; right now if you VOP_REVOKE() a 
> vnode, there will be a vrele() call that will VOP_INACTIVE() on deadfs.
> 
> So I think the semantics are the same.
> 
> Actually, the change closes a small window of error. In the reuse case, if 
> the vget() call happens after the new user has already vrele()'d the node, 
> the old code would skip a VOP_INACTIVE() call that would of happened had 
> the vget() code not held a reference.

Attachment: pgpm4gRL91JVW.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index