From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11078 invoked by alias); 17 Jul 2008 20:41:48 -0000 Received: (qmail 11047 invoked by uid 9453); 17 Jul 2008 20:41:47 -0000 Date: Thu, 17 Jul 2008 20:41:00 -0000 Message-ID: <20080717204147.11031.qmail@sourceware.org> From: teigland@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, master, updated. cluster-2.99.06-27-g62ca3ea X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3bff18ecd49d5c9ec131fbf811350a4d677bdc8f X-Git-Newrev: 62ca3ea7fa7401c49a6bf7e18c1b7518aaa9b9bd Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00095.txt.bz2 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=62ca3ea7fa7401c49a6bf7e18c1b7518aaa9b9bd The branch, master has been updated via 62ca3ea7fa7401c49a6bf7e18c1b7518aaa9b9bd (commit) from 3bff18ecd49d5c9ec131fbf811350a4d677bdc8f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 62ca3ea7fa7401c49a6bf7e18c1b7518aaa9b9bd Author: David Teigland Date: Thu Jul 17 15:34:47 2008 -0500 gfs_controld: byte swap ids earlier before they are used in match_change. Signed-off-by: David Teigland ----------------------------------------------------------------------- Summary of changes: group/gfs_controld/cpg-new.c | 28 ++++++++++------------------ 1 files changed, 10 insertions(+), 18 deletions(-) diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c index fdfef9a..b7d1f35 100644 --- a/group/gfs_controld/cpg-new.c +++ b/group/gfs_controld/cpg-new.c @@ -772,23 +772,20 @@ static void cleanup_changes(struct mountgroup *mg) /* do the change details in the message match the details of the given change */ static int match_change(struct mountgroup *mg, struct change *cg, - struct gfs_header *hd, int len, struct mg_info *mi) + struct gfs_header *hd, struct mg_info *mi, + struct id_info *ids) { - struct id_info *ids, *id; + struct id_info *id; struct member *memb; uint32_t seq = hd->msgdata; int i, members_mismatch; - ids = (struct id_info *)((char *)hd + - sizeof(struct gfs_header) + - mi->mg_info_size); - /* We can ignore messages if we're not in the list of members. The one known time this will happen is after we've joined the cpg, we can get messages for changes prior to the change in which we're added. */ - id = get_id_struct(ids, mi->id_info_count, mi->id_info_size, our_nodeid); + id = get_id_struct(ids, mi->id_info_count, mi->id_info_size,our_nodeid); if (!id || !(id->flags & IDI_NODEID_IS_MEMBER)) { log_group(mg, "match_change fail %d:%u we are not in members", @@ -860,12 +857,12 @@ static int match_change(struct mountgroup *mg, struct change *cg, for confchg1 or confchg2? Hopefully by comparing the counts and members. */ static struct change *find_change(struct mountgroup *mg, struct gfs_header *hd, - int len, struct mg_info *mi) + struct mg_info *mi, struct id_info *ids) { struct change *cg; list_for_each_entry_reverse(cg, &mg->changes, list) { - if (!match_change(mg, cg, hd, len, mi)) + if (!match_change(mg, cg, hd, mi, ids)) continue; return cg; } @@ -918,13 +915,13 @@ static void receive_start(struct mountgroup *mg, struct gfs_header *hd, int len) log_group(mg, "receive_start %d:%u len %d", hd->nodeid, seq, len); - /* header endian conv in deliver_cb, mg_info endian conv here, - id_info endian conv below */ - mi = (struct mg_info *)((char *)hd + sizeof(struct gfs_header)); + ids = (struct id_info *)((char *)mi + sizeof(struct mg_info)); + mg_info_in(mi); + ids_in(mi, ids); - cg = find_change(mg, hd, len, mi); + cg = find_change(mg, hd, mi, ids); if (!cg) return; @@ -970,11 +967,6 @@ static void receive_start(struct mountgroup *mg, struct gfs_header *hd, int len) /* a shortcut to the saved mg_info */ memb->mg_info = (struct mg_info *)(memb->start_msg + sizeof(struct gfs_header)); - /* endian swap saved id_info entries */ - ids = (struct id_info *)(memb->start_msg + - sizeof(struct gfs_header) + - memb->mg_info->mg_info_size); - ids_in(mi, ids); } /* start messages are associated with a specific change and use the hooks/post-receive -- Cluster Project