cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.06-27-g62ca3ea
Date: 17 Jul 2008 20:41:47 -0000	[thread overview]
Message-ID: <20080717204147.11031.qmail@sourceware.org> (raw)

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 <teigland@redhat.com>
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 <teigland@redhat.com>

-----------------------------------------------------------------------

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



                 reply	other threads:[~2008-07-17 20:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080717204147.11031.qmail@sourceware.org \
    --to=teigland@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).