ocfs2: Negotiate locking protocol versions.
authorJoel Becker <Joel.Becker@oracle.com>
Sat, 26 Jan 2008 01:02:21 +0000 (17:02 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Thu, 7 Feb 2008 00:11:29 +0000 (16:11 -0800)
commitd24fbcda0c4988322949df3d759f1cfb32b32953
treed8454796d58649126005001472e9dcee8bd557ca
parent3e6bdf473f489664dac4d7511d26c7ac3dfdc748
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 <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
12 files changed:
fs/ocfs2/cluster/tcp_internal.h
fs/ocfs2/dlm/dlmapi.h
fs/ocfs2/dlm/dlmcommon.h
fs/ocfs2/dlm/dlmdomain.c
fs/ocfs2/dlm/dlmfs.c
fs/ocfs2/dlm/userdlm.c
fs/ocfs2/dlm/userdlm.h
fs/ocfs2/dlmglue.c
fs/ocfs2/dlmglue.h
fs/ocfs2/ocfs2.h
fs/ocfs2/ocfs2_lockingver.h [new file with mode: 0644]
fs/ocfs2/super.c