FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 05-02-2008, 10:10 PM
 
Default Cluster Project branch, RHEL5, updated. cmirror_1_1_15-61-g8c73b98

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=8c73b98340 8ca5d1949b849e3912fc8a5b92760d

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
 

Thread Tools




All times are GMT. The time now is 02:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org