Subject: Re: kern/25279: NFS read doesn't update atime
To: Chuck Silvers <chuq@chuq.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 06/28/2005 17:39:28
On Tue, Jun 28, 2005 at 06:07:20AM -0700, Chuck Silvers wrote:
> On Tue, Jun 28, 2005 at 07:25:29AM +0900, YAMAMOTO Takashi wrote:
> > > what lock protects ip->i_flag?  it's current the VOP_LOCK(),
> > > but we can't acquire that lock in VOP_GETPAGES() due to
> > > lock-ordering constraints.
> > > 
> > > -Chuck
> > 
> > i_flag is protected by kernel_lock.
> > VOP_LOCK is not always held eg. when GOP_ALLOC -> ffs_balloc updates i_flag.
> 
> ok, I busted that when I did the UBC stuff then.
> it was not my intent to protect anything with the global lock.
> it would be good for us to avoid making this situation worse by
> adding more usages that are protected only by the global lock.

On the other hand I don't think it's a problem to introduce this on the
netbsd-2 and netbsd-3 branches.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--