VFS locking changes in 2.5.7

VFS locking changes in 2.5.7

Post by Richard Gooc » Tue, 02 Apr 2002 05:20:09



  Hi, Al. I've noticed that you've made changes to the locking rules
for the VFS (for example, the inode lookup() method no longer has the
BKL).

I also note that you've thrown calls to lock_kernel() and
unlock_kernel() into the devfs code. Did you check each place you
added the BKL to devfs that it was needed, or was this just a blind
global operation? At first glance, it appears that many of the places
where the BKL was inserted are not needed.

                                Regards,

                                        Richard....


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

VFS locking changes in 2.5.7

Post by Alexander Vir » Tue, 02 Apr 2002 06:10:08



>   Hi, Al. I've noticed that you've made changes to the locking rules
> for the VFS (for example, the inode lookup() method no longer has the
> BKL).

> I also note that you've thrown calls to lock_kernel() and
> unlock_kernel() into the devfs code. Did you check each place you
> added the BKL to devfs that it was needed, or was this just a blind
> global operation? At first glance, it appears that many of the places
> where the BKL was inserted are not needed.

See Documentation/filesystems/porting

BKL had been shifted inside several methods, so that filesystem code itself
had the same locking as it used to (i.e. code that used to be under BKL
stayed under it).  If your code doesn't need BKL - feel free to shrink the
area, but keep in mind that it used to be under BKL.

I didn't _add_ BKL - neither in devfs nor anywhere else.  lock_kernel() is
the boundary of the protected area and all that had happened is that this
area had slightly shrunken, so its boundaries are inside the method instead
of being around its caller.

Again, further shrinking is up to maintainers of the filesystems.

While we are at it, the changes in question had happened quite a couple
of months ago - none of them in 2.5.7...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

VFS locking changes in 2.5.7

Post by Richard Gooc » Tue, 02 Apr 2002 06:10:08


Alexander Viro writes:


> >   Hi, Al. I've noticed that you've made changes to the locking rules
> > for the VFS (for example, the inode lookup() method no longer has the
> > BKL).

> > I also note that you've thrown calls to lock_kernel() and
> > unlock_kernel() into the devfs code. Did you check each place you
> > added the BKL to devfs that it was needed, or was this just a blind
> > global operation? At first glance, it appears that many of the places
> > where the BKL was inserted are not needed.

> See Documentation/filesystems/porting

Ah. Useful.

Quote:> BKL had been shifted inside several methods, so that filesystem code
> itself had the same locking as it used to (i.e. code that used to be
> under BKL stayed under it).  If your code doesn't need BKL - feel
> free to shrink the area, but keep in mind that it used to be under
> BKL.

OK, that's what I figured. Thanks for the confirmation.

Quote:> I didn't _add_ BKL - neither in devfs nor anywhere else.  lock_kernel() is
> the boundary of the protected area and all that had happened is that this
> area had slightly shrunken, so its boundaries are inside the method instead
> of being around its caller.

> Again, further shrinking is up to maintainers of the filesystems.

Fair enough. I'll start looking at that.

Quote:> While we are at it, the changes in question had happened quite a
> couple of months ago - none of them in 2.5.7...

Well, 2.5.7 is the first I've checked in a while: I've been mostly
focussed on 2.4.x recently.

                                Regards,

                                        Richard....


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. Why NFS server does not pass lock requests via VFS lock() op?

Could anyone remind me of why NFS kernel would not pass byte range lock
requests to the underlying filsystem at the server side?
I think another person at IBM (Brian?) submitted a patch for this but such
patch never got included in the distribution.

I think a patch to pass lock requests to the underlying filesystem does not
affect single node NFS servers and it enables us to
support clustered Linux-based NAS heads over distributed file systems.

Juan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. NY-New York-NOT AN AGENCY-Oracle,PL/SQL,Java,C,Unix,OAS,Dynamo

3. VFS locking & HFS problems (2.4.6pre6)

4. Rage With Linux

5. VFS inode lock/semaphore

6. apropos/whatis broken in man-1.5i-0.6x.1?

7. VFS-Lock patch

8. Apache and RH7.1

9. netscape rpm from compaq + my box = lock lock lock

10. VFS: Disk change detected on device sr(11,0)

11. VFS: Disk change detected

12. VFS: Disk change detected on device sr (11,0)

13. VFS: Disk change detected on device 2/9