aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster
diff options
context:
space:
mode:
authorJoel Becker <Joel.Becker@oracle.com>2008-01-25 20:02:21 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2008-02-06 19:11:29 -0500
commitd24fbcda0c4988322949df3d759f1cfb32b32953 (patch)
treed8454796d58649126005001472e9dcee8bd557ca /fs/ocfs2/cluster
parent3e6bdf473f489664dac4d7511d26c7ac3dfdc748 (diff)
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>
Diffstat (limited to 'fs/ocfs2/cluster')
-rw-r--r--fs/ocfs2/cluster/tcp_internal.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index b2e832aca567..d25b9af28500 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -38,6 +38,15 @@
38 * locking semantics of the file system using the protocol. It should 38 * locking semantics of the file system using the protocol. It should
39 * be somewhere else, I'm sure, but right now it isn't. 39 * be somewhere else, I'm sure, but right now it isn't.
40 * 40 *
41 * With version 11, we separate out the filesystem locking portion. The
42 * filesystem now has a major.minor version it negotiates. Version 11
43 * introduces this negotiation to the o2dlm protocol, and as such the
44 * version here in tcp_internal.h should not need to be bumped for
45 * filesystem locking changes.
46 *
47 * New in version 11
48 * - Negotiation of filesystem locking in the dlm join.
49 *
41 * New in version 10: 50 * New in version 10:
42 * - Meta/data locks combined 51 * - Meta/data locks combined
43 * 52 *
@@ -66,7 +75,7 @@
66 * - full 64 bit i_size in the metadata lock lvbs 75 * - full 64 bit i_size in the metadata lock lvbs
67 * - introduction of "rw" lock and pushing meta/data locking down 76 * - introduction of "rw" lock and pushing meta/data locking down
68 */ 77 */
69#define O2NET_PROTOCOL_VERSION 10ULL 78#define O2NET_PROTOCOL_VERSION 11ULL
70struct o2net_handshake { 79struct o2net_handshake {
71 __be64 protocol_version; 80 __be64 protocol_version;
72 __be64 connector_id; 81 __be64 connector_id;