diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 12:46:35 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 12:46:35 -0800 |
commit | e5a9e8e6890d9b9c7a0f25b03ffdaf28614a9a4c (patch) | |
tree | 5e8fbbcbb7516c8eca9c431b47c70c752823af39 /fs/ocfs2/dlm/dlmcommon.h | |
parent | bfa271d026fef5d8db9a95342c38eab6f7b287a2 (diff) | |
parent | d24fbcda0c4988322949df3d759f1cfb32b32953 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
ocfs2: Negotiate locking protocol versions.
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index e90b92f9ece..9843ee17ea2 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h @@ -142,6 +142,12 @@ struct dlm_ctxt spinlock_t work_lock; struct list_head dlm_domain_handlers; struct list_head dlm_eviction_callbacks; + + /* The filesystem specifies this at domain registration. We + * cache it here to know what to tell other nodes. */ + struct dlm_protocol_version fs_locking_proto; + /* This is the inter-dlm communication version */ + struct dlm_protocol_version dlm_locking_proto; }; static inline struct hlist_head *dlm_lockres_hash(struct dlm_ctxt *dlm, unsigned i) @@ -589,10 +595,24 @@ struct dlm_proxy_ast #define DLM_PROXY_AST_MAX_LEN (sizeof(struct dlm_proxy_ast)+DLM_LVB_LEN) #define DLM_MOD_KEY (0x666c6172) -enum dlm_query_join_response { +enum dlm_query_join_response_code { JOIN_DISALLOW = 0, JOIN_OK, JOIN_OK_NO_MAP, + JOIN_PROTOCOL_MISMATCH, +}; + +union dlm_query_join_response { + u32 intval; + struct { + u8 code; /* Response code. dlm_minor and fs_minor + are only valid if this is JOIN_OK */ + u8 dlm_minor; /* The minor version of the protocol the + dlm is speaking. */ + u8 fs_minor; /* The minor version of the protocol the + filesystem is speaking. */ + u8 reserved; + } packet; }; struct dlm_lock_request @@ -633,6 +653,8 @@ struct dlm_query_join_request u8 node_idx; u8 pad1[2]; u8 name_len; + struct dlm_protocol_version dlm_proto; + struct dlm_protocol_version fs_proto; u8 domain[O2NM_MAX_NAME_LEN]; u8 node_map[BITS_TO_BYTES(O2NM_MAX_NODES)]; }; |