From d24fbcda0c4988322949df3d759f1cfb32b32953 Mon Sep 17 00:00:00 2001 From: Joel Becker Date: Fri, 25 Jan 2008 17:02:21 -0800 Subject: ocfs2: Negotiate locking protocol versions. Currently, when ocfs2 nodes connect via TCP, they advertise their compatibility level. If the versions do not match, two nodes cannot speak to each other and they disconnect. As a result, this provides no forward or backwards compatibility. This patch implements a simple protocol negotiation at the dlm level by introducing a major/minor version number scheme for entities that communicate. Specifically, o2dlm has a major/minor version for interaction with o2dlm on other nodes, and ocfs2 itself has a major/minor version for interacting with the filesystem on other nodes. This will allow rolling upgrades of ocfs2 clusters when changes to the locking or network protocols can be done in a backwards compatible manner. In those cases, only the minor number is changed and the negotatied protocol minor is returned from dlm join. In the far less likely event that a required protocol change makes backwards compatibility impossible, we simply bump the major number. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh --- fs/ocfs2/dlm/userdlm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/ocfs2/dlm/userdlm.h') diff --git a/fs/ocfs2/dlm/userdlm.h b/fs/ocfs2/dlm/userdlm.h index c400e93bbf79..39ec27738499 100644 --- a/fs/ocfs2/dlm/userdlm.h +++ b/fs/ocfs2/dlm/userdlm.h @@ -83,7 +83,8 @@ void user_dlm_write_lvb(struct inode *inode, void user_dlm_read_lvb(struct inode *inode, char *val, unsigned int len); -struct dlm_ctxt *user_dlm_register_context(struct qstr *name); +struct dlm_ctxt *user_dlm_register_context(struct qstr *name, + struct dlm_protocol_version *proto); void user_dlm_unregister_context(struct dlm_ctxt *dlm); struct dlmfs_inode_private { -- cgit v1.2.2