public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: jbrassow@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, RHEL5, updated. cmirror_1_1_15-127-g6c8d740
Date: Tue, 15 Jul 2008 16:59:00 -0000	[thread overview]
Message-ID: <20080715165916.5696.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=6c8d7408095782bb00b5361a7df5973f3dcda183

The branch, RHEL5 has been updated
       via  6c8d7408095782bb00b5361a7df5973f3dcda183 (commit)
      from  b7dcdfe59e6943b58d281d8aa5db1e8e614d2af1 (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 6c8d7408095782bb00b5361a7df5973f3dcda183
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Tue Jul 15 11:58:26 2008 -0500

    clogd:  Fix for bug 455453: small mirror creation fails
    
    Was setting the checkpoint attribute 'attr.maxSectionSize'
    with the size of the bitmap.  However, when mirrors are
    really small (<= 30M) other sections may have a larger
    size and need to considered.

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

Summary of changes:
 cmirror-kernel/src/dm-clog-tfr.c |    5 +++-
 cmirror/src/cluster.c            |   45 ++++++++++++++++++++++++++++++++-----
 2 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/cmirror-kernel/src/dm-clog-tfr.c b/cmirror-kernel/src/dm-clog-tfr.c
index 7abd554..95d4bd2 100644
--- a/cmirror-kernel/src/dm-clog-tfr.c
+++ b/cmirror-kernel/src/dm-clog-tfr.c
@@ -98,8 +98,11 @@ static int fill_pkg(struct cn_msg *msg, struct clog_tfr *tfr)
 			pkg->error = -msg->ack;
 			*(pkg->data_size) = 0;
 		} else if (tfr->data_size > *(pkg->data_size)) {
-			DMERR("Insufficient space to receive package [%s]",
+			DMERR("Insufficient space to receive package [%s]::",
 			      RQ_TYPE(tfr->request_type));
+			DMERR("  tfr->data_size    = %u", tfr->data_size);
+			DMERR("  *(pkg->data_size) = %u", *(pkg->data_size));
+
 			*(pkg->data_size) = 0;
 			pkg->error = -ENOSPC;
 		} else {
diff --git a/cmirror/src/cluster.c b/cmirror/src/cluster.c
index b928fe2..3a18687 100644
--- a/cmirror/src/cluster.c
+++ b/cmirror/src/cluster.c
@@ -19,6 +19,36 @@
 #include "logging.h"
 #include "link_mon.h"
 
+/* Open AIS error codes
+        SA_AIS_OK = 1,
+        SA_AIS_ERR_LIBRARY = 2,
+        SA_AIS_ERR_VERSION = 3,
+        SA_AIS_ERR_INIT = 4,
+        SA_AIS_ERR_TIMEOUT = 5,
+        SA_AIS_ERR_TRY_AGAIN = 6,
+        SA_AIS_ERR_INVALID_PARAM = 7,
+        SA_AIS_ERR_NO_MEMORY = 8,
+        SA_AIS_ERR_BAD_HANDLE = 9,
+        SA_AIS_ERR_BUSY = 10,
+        SA_AIS_ERR_ACCESS = 11,
+        SA_AIS_ERR_NOT_EXIST = 12,
+        SA_AIS_ERR_NAME_TOO_LONG = 13,
+        SA_AIS_ERR_EXIST = 14,
+        SA_AIS_ERR_NO_SPACE = 15,
+        SA_AIS_ERR_INTERRUPT = 16,
+        SA_AIS_ERR_NAME_NOT_FOUND = 17,
+        SA_AIS_ERR_NO_RESOURCES = 18,
+        SA_AIS_ERR_NOT_SUPPORTED = 19,
+        SA_AIS_ERR_BAD_OPERATION = 20,
+        SA_AIS_ERR_FAILED_OPERATION = 21,
+        SA_AIS_ERR_MESSAGE_ERROR = 22,
+        SA_AIS_ERR_QUEUE_FULL = 23,
+        SA_AIS_ERR_QUEUE_NOT_AVAILABLE = 24,
+        SA_AIS_ERR_BAD_FLAGS = 25,
+        SA_AIS_ERR_TOO_BIG = 26,
+        SA_AIS_ERR_NO_SECTIONS = 27
+*/
+
 #define DM_CLOG_RESPONSE 0x1000 /* in last byte of 32-bit value */
 #define DM_CLOG_CHECKPOINT_READY 21
 #define DM_CLOG_CONFIG_CHANGE    22
@@ -284,6 +314,9 @@ static struct checkpoint_data *prepare_checkpoint(struct clog_cpg *entry,
 			free(new);
 			return NULL;
 		}
+		LOG_DBG("[%s] Checkpoint prepared for node %u:",
+			SHORT_UUID(new->uuid), new->requester);
+		LOG_DBG("  bitmap_size = %d", new->bitmap_size);
 	} else {
 		/*
 		 * We can't store bitmaps yet, because the log is not
@@ -294,8 +327,6 @@ static struct checkpoint_data *prepare_checkpoint(struct clog_cpg *entry,
 		new->bitmap_size = 0;
 	}
 
-	LOG_DBG("[%s] Checkpoint prepared for %u",
-		SHORT_UUID(new->uuid), cp_requester);
 	return new;
 }
 
@@ -335,7 +366,8 @@ static int export_checkpoint(struct checkpoint_data *cp)
 	attr.checkpointSize = cp->bitmap_size * 2 + strlen(cp->recovering_region) + 1;
 	attr.retentionDuration = SA_TIME_MAX;
 	attr.maxSections = 4;      /* don't know why we need +1 */
-	attr.maxSectionSize = cp->bitmap_size;
+	attr.maxSectionSize = (cp->bitmap_size > (strlen(cp->recovering_region) + 1)) ?
+		cp->bitmap_size : (strlen(cp->recovering_region) + 1);
 	attr.maxSectionIdSize = 22;
 
 	flags = SA_CKPT_CHECKPOINT_READ |
@@ -356,8 +388,8 @@ open_retry:
 	}
 
 	if (rv != SA_AIS_OK) {
-		LOG_ERROR("[%s] Failed to open checkpoint for %u",
-			  SHORT_UUID(cp->uuid), cp->requester);
+		LOG_ERROR("[%s] Failed to open checkpoint for %u:  Reason = %d",
+			  SHORT_UUID(cp->uuid), cp->requester, rv);
 		return -EIO; /* FIXME: better error */
 	}
 
@@ -695,7 +727,8 @@ static int do_cluster_work(void *data)
 				break;
 			default:
 				/* FIXME: Skipping will cause list corruption */
-				LOG_ERROR("Failed to export checkpoint");
+				LOG_ERROR("[%s] Failed to export checkpoint for %u",
+					  SHORT_UUID(entry->name.value), cp->requester);
 			}
 		}
 	}


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-07-15 16:59 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=20080715165916.5696.qmail@sourceware.org \
    --to=jbrassow@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).