From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-61-g8c73b98
Date: 2 May 2008 22:10:39 -0000 [thread overview]
Message-ID: <20080502221039.14786.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=8c73b983408ca5d1949b849e3912fc8a5b92760d
The branch, RHEL5 has been updated
via 8c73b983408ca5d1949b849e3912fc8a5b92760d (commit)
from b0b6f8fef397d7ec0099fa07475aaad5b2c81bac (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 8c73b983408ca5d1949b849e3912fc8a5b92760d
Author: Jonathan Brassow <jbrassow@redhat.com>
Date: Fri May 2 17:09:45 2008 -0500
clogd: Fix a number of issues with sync_bits accounting
1) Was writing wrong bitset to disk! Write clean_bits to
disk, not sync_bits. (sync_bits gets copied from
clean_bits upon resume/read.)
2) Was counting bits in clean_bits instead of sync_bits
after a resume. While this is fine for the first
machine in the cluster (because clean gets copied
to sync), it is _not_ ok for everyone else. This
is because as the mirror ages, the sync and clean
bitsets diverge; and the mirror will have aged some
by the time the other machines join in.
3) Completely missed setting sync_count when corelog
was used.
-----------------------------------------------------------------------
Summary of changes:
cmirror/src/functions.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/cmirror/src/functions.c b/cmirror/src/functions.c
index 9756136..2c917d2 100644
--- a/cmirror/src/functions.c
+++ b/cmirror/src/functions.c
@@ -219,7 +219,7 @@ static int rw_log(struct log_c *lc, int do_write)
* Valid return codes:
* -EINVAL: Invalid header, bits not copied
* -EIO: Unable to read disk log
- * 0: Valid header, disk bit -> lc->sync_bits
+ * 0: Valid header, disk bit -> lc->clean_bits
*
* Returns: 0 on success, -EXXX on failure
*/
@@ -275,7 +275,7 @@ static int write_log(struct log_c *lc)
/* Write disk bits from clean_bits */
bitset_size = lc->region_count / 8;
bitset_size += (lc->region_count % 8) ? 1 : 0;
- memcpy(lc->disk_buffer + 1024, lc->sync_bits, bitset_size);
+ memcpy(lc->disk_buffer + 1024, lc->clean_bits, bitset_size);
if (rw_log(lc, 1)) {
lc->log_dev_failed = 1;
@@ -720,12 +720,8 @@ static int clog_resume(struct clog_tfr *tfr)
return -EINVAL;
case 3:
LOG_DBG("[%s] Non-master resume: bits pre-loaded",
- SHORT_UUID(lc->uuid));
+ SHORT_UUID(lc->uuid));
lc->resume_override = 1000;
- lc->sync_count = count_bits32(lc->clean_bits, lc->bitset_uint32_count);
- LOG_DBG("[%s] Initial sync_count = %llu",
- SHORT_UUID(lc->uuid),
- (unsigned long long)lc->sync_count);
goto out;
default:
LOG_ERROR("Error:: multiple loading of bits (%d)", lc->resume_override);
@@ -773,10 +769,6 @@ static int clog_resume(struct clog_tfr *tfr)
/* copy clean across to sync */
memcpy(lc->sync_bits, lc->clean_bits, size);
- lc->sync_count = count_bits32(lc->clean_bits, lc->bitset_uint32_count);
- LOG_DBG("[%s] Initial sync_count = %llu",
- SHORT_UUID(lc->uuid), (unsigned long long)lc->sync_count);
- lc->sync_search = 0;
if (commit_log && (lc->disk_fd >= 0)) {
tfr->error = write_log(lc);
@@ -787,6 +779,10 @@ static int clog_resume(struct clog_tfr *tfr)
lc->touched = 0;
}
out:
+ lc->sync_count = count_bits32(lc->sync_bits, lc->bitset_uint32_count);
+ LOG_DBG("[%s] Initial sync_count = %llu",
+ SHORT_UUID(lc->uuid), (unsigned long long)lc->sync_count);
+ lc->sync_search = 0;
lc->state = LOG_RESUMED;
lc->recovery_halted = 0;
hooks/post-receive
--
Cluster Project
reply other threads:[~2008-05-02 22:10 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=20080502221039.14786.qmail@sourceware.org \
--to=jbrassow@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.