aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-12-13 11:37:16 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2007-02-05 13:35:50 -0500
commit38aa8b0c59c35d10d15ebf00ceee641f9ed7acba (patch)
tree17444ed0f0e195677a6faaac31ba296f37b5e148 /fs/dlm/dlm_internal.h
parentdc200a8848cca8b0e99012996c66f4b379a390ed (diff)
[DLM] fix old rcom messages
A reply to a recovery message will often be received after the relevant recovery sequence has aborted and the next recovery sequence has begun. We need to ignore replies to these old messages from the previous recovery. There's already a way to do this for synchronous recovery requests using the rc_id number, but not for async. Each recovery sequence already has a locally unique sequence number associated with it. This patch adds a field to the rcom (recovery message) structure where this recovery sequence number can be placed, rc_seq. When a node sends a reply to a recovery request, it copies the rc_seq number it received into rc_seq_reply. When the first node receives the reply to its recovery message, it will check whether rc_seq_reply matches the current recovery sequence number, ls_recover_seq, and if not then it ignores the old reply. An old, inadequate approach to filtering out old replies (checking if the current stage of recovery has moved back to the start) has been removed from two spots. The protocol version number is changed to reflect the different rcom structures. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 1ee8195e6fc0..7185a132a8b5 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -309,8 +309,8 @@ static inline int rsb_flag(struct dlm_rsb *r, enum rsb_flags flag)
309 309
310/* dlm_header is first element of all structs sent between nodes */ 310/* dlm_header is first element of all structs sent between nodes */
311 311
312#define DLM_HEADER_MAJOR 0x00020000 312#define DLM_HEADER_MAJOR 0x00030000
313#define DLM_HEADER_MINOR 0x00000001 313#define DLM_HEADER_MINOR 0x00000000
314 314
315#define DLM_MSG 1 315#define DLM_MSG 1
316#define DLM_RCOM 2 316#define DLM_RCOM 2
@@ -386,6 +386,8 @@ struct dlm_rcom {
386 uint32_t rc_type; /* DLM_RCOM_ */ 386 uint32_t rc_type; /* DLM_RCOM_ */
387 int rc_result; /* multi-purpose */ 387 int rc_result; /* multi-purpose */
388 uint64_t rc_id; /* match reply with request */ 388 uint64_t rc_id; /* match reply with request */
389 uint64_t rc_seq; /* sender's ls_recover_seq */
390 uint64_t rc_seq_reply; /* remote ls_recover_seq */
389 char rc_buf[0]; 391 char rc_buf[0];
390}; 392};
391 393