rcom.c (38aa8b0c59c35d10d15ebf00ceee641f9ed7acba) | rcom.c (9e971b715dcc3cd5f4383f2815aaa7e5853d1f7b) |
---|---|
1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 5** Copyright (C) 2005 Red Hat, Inc. All rights reserved. 6** 7** This copyrighted material is made available to anyone wishing to use, 8** modify, copy, or redistribute it subject to the terms and conditions --- 68 unchanged lines hidden (view full) --- 77 node is configured the same way as itself. */ 78 79static void make_config(struct dlm_ls *ls, struct rcom_config *rf) 80{ 81 rf->rf_lvblen = ls->ls_lvblen; 82 rf->rf_lsflags = ls->ls_exflags; 83} 84 | 1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 5** Copyright (C) 2005 Red Hat, Inc. All rights reserved. 6** 7** This copyrighted material is made available to anyone wishing to use, 8** modify, copy, or redistribute it subject to the terms and conditions --- 68 unchanged lines hidden (view full) --- 77 node is configured the same way as itself. */ 78 79static void make_config(struct dlm_ls *ls, struct rcom_config *rf) 80{ 81 rf->rf_lvblen = ls->ls_lvblen; 82 rf->rf_lsflags = ls->ls_exflags; 83} 84 |
85static int check_config(struct dlm_ls *ls, struct rcom_config *rf, int nodeid) | 85static int check_config(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid) |
86{ | 86{ |
87 struct rcom_config *rf = (struct rcom_config *) rc->rc_buf; 88 89 if ((rc->rc_header.h_version & 0xFFFF0000) != DLM_HEADER_MAJOR) { 90 log_error(ls, "version mismatch: %x nodeid %d: %x", 91 DLM_HEADER_MAJOR | DLM_HEADER_MINOR, nodeid, 92 rc->rc_header.h_version); 93 return -EINVAL; 94 } 95 |
|
87 if (rf->rf_lvblen != ls->ls_lvblen || 88 rf->rf_lsflags != ls->ls_exflags) { 89 log_error(ls, "config mismatch: %d,%x nodeid %d: %d,%x", 90 ls->ls_lvblen, ls->ls_exflags, 91 nodeid, rf->rf_lvblen, rf->rf_lsflags); 92 return -EINVAL; 93 } 94 return 0; --- 45 unchanged lines hidden (view full) --- 140 141 rc = (struct dlm_rcom *) ls->ls_recover_buf; 142 143 if (rc->rc_result == -ESRCH) { 144 /* we pretend the remote lockspace exists with 0 status */ 145 log_debug(ls, "remote node %d not ready", nodeid); 146 rc->rc_result = 0; 147 } else | 96 if (rf->rf_lvblen != ls->ls_lvblen || 97 rf->rf_lsflags != ls->ls_exflags) { 98 log_error(ls, "config mismatch: %d,%x nodeid %d: %d,%x", 99 ls->ls_lvblen, ls->ls_exflags, 100 nodeid, rf->rf_lvblen, rf->rf_lsflags); 101 return -EINVAL; 102 } 103 return 0; --- 45 unchanged lines hidden (view full) --- 149 150 rc = (struct dlm_rcom *) ls->ls_recover_buf; 151 152 if (rc->rc_result == -ESRCH) { 153 /* we pretend the remote lockspace exists with 0 status */ 154 log_debug(ls, "remote node %d not ready", nodeid); 155 rc->rc_result = 0; 156 } else |
148 error = check_config(ls, (struct rcom_config *) rc->rc_buf, 149 nodeid); | 157 error = check_config(ls, rc, nodeid); |
150 /* the caller looks at rc_result for the remote recovery status */ 151 out: 152 return error; 153} 154 155static void receive_rcom_status(struct dlm_ls *ls, struct dlm_rcom *rc_in) 156{ 157 struct dlm_rcom *rc; --- 360 unchanged lines hidden --- | 158 /* the caller looks at rc_result for the remote recovery status */ 159 out: 160 return error; 161} 162 163static void receive_rcom_status(struct dlm_ls *ls, struct dlm_rcom *rc_in) 164{ 165 struct dlm_rcom *rc; --- 360 unchanged lines hidden --- |