#18 userfs-level locking support

open
nobody
None
5
2004-09-29
2004-09-29
Aaron Wirtz
No

An interface presented to the userland daemon which intercepts
VFS locking requests and runs them through the daemon, a la
NFS rpc.lockd before allowing the VFS layer to acquire a lock.

This would allow user filesystems to deny locks based on special
conditions not visible to the kernel such as a lock on a network fs
where the remote machine already has a local lock on the file, or
it could be used to write a userfs that translates kernel locks into
lockfiles, allowing something like advisory fcntl/flock locking on
top of ftpfs, etc.

Ideas, anyone? (If I could figure out how the darn NFS
mechanism actually works in the kernel I'd write the patch
myself...)

(looks difficult. Maybe I'm reading something in the kernel source
wrong, but the locking mechanism in Linux seems to be on the
VFS layer, not the FS layer, with NFS being the primary
exception, and that only through a hack.)

Discussion