ocfs2/dlm: Use negotiated o2dlm protocol version
authorSunil Mushran <sunil.mushran@oracle.com>
Wed, 4 May 2011 17:27:10 +0000 (10:27 -0700)
committerJoel Becker <jlbec@evilplan.org>
Fri, 13 May 2011 18:26:37 +0000 (11:26 -0700)
Patch fixes a bug in the o2dlm protocol negotiation in that it is using
the builtin version rather than the negotiated version during the domain
join. This causes join errors when a node having kernel >= 2.6.37 joins
a cluster with nodes having kernels < 2.6.37.

This only affects the o2cb cluster stack.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Reported-by: Jacek Stepniewski <Jacek.Stepniewski@agora.pl>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
fs/ocfs2/dlm/dlmdomain.c

index 7540a492eaba0188d624a08f73688eee04838288..3b179d6cbde09be9017eb21fbefcc5df8b217a53 100644 (file)
@@ -1614,7 +1614,8 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm)
        spin_unlock(&dlm->spinlock);
 
        /* Support for global heartbeat and node info was added in 1.1 */
-       if (dlm_protocol.pv_major > 1 || dlm_protocol.pv_minor > 0) {
+       if (dlm->dlm_locking_proto.pv_major > 1 ||
+           dlm->dlm_locking_proto.pv_minor > 0) {
                status = dlm_send_nodeinfo(dlm, ctxt->yes_resp_map);
                if (status) {
                        mlog_errno(status);