Messages in this thread | | | Subject | Proposal for new lock ownership scheme to support NFS over distributed filesystems | From | Juan Gomez <> | Date | Thu, 31 Oct 2002 10:05:51 -0800 |
| |
Hello all,
As a prelude to adding support in kNFS(lockd) to pass lock information via the VFS interface I want to firsr propose some minor changes that will enable us to have a single lock ownership space that is shared and enforced at all nodes.
Currently lockd identified range locks with two fields fl_owner and fl_pid. NFS code places a memory pointer (pointer to host structure representing NFS client holding the lock) in fl_owner which works great in single node NFS but breaks when we attempt to pass lock requests to an the underlying distributed filesystem in the context of a clustered NAS head. This can be easily fixed by filling fl_owner field with the IP address of the NFS client requesting the lock, which is just a minor patch.
The patch above, however, does not fix all our problems as locks acquired locally in the NFS server nodes could collide with NFS locks. Currently, the fl_owner field for locks acquired via the local file system is filled with another memory pointer (i.e. current->files). This also breaks appart when using a distributed file system. My proposal for this would be use a local IP address to put in the fl_owner field of locks acquired locally in a node.
These two patches cause no problem for current single node NFS servers and enable Linux as a platform to support distributed filesystems and NFS serving simultaneously and correctly.
I would like to get your feedback on this proposal and if accepted as it is I will later follow with patches for current versions of the kernel NFS.
Regards, Juan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |