public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* RHEL5 - clogd: Fix for bug 464550 - sync can get stuck after creation
@ 2008-10-02 22:21 Jonathan Brassow
0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2008-10-02 22:21 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7d0f35186a7b2209f77424e2e1117cb5fc3803f3
Commit: 7d0f35186a7b2209f77424e2e1117cb5fc3803f3
Parent: 08cc5e18bbdc5add08382c56a730ff32afcbfd87
Author: Jonathan Brassow <jbrassow@redhat.com>
AuthorDate: Thu Oct 2 17:19:20 2008 -0500
Committer: Jonathan Brassow <jbrassow@redhat.com>
CommitterDate: Thu Oct 2 17:19:20 2008 -0500
clogd: Fix for bug 464550 - sync can get stuck after creation
Nodes that get their sync/clean bits from checkpoints were being
allowed to alter them in a resume - something on the master node
should be allowed to do.
---
cmirror/src/functions.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/cmirror/src/functions.c b/cmirror/src/functions.c
index 47d7a15..9f6109c 100644
--- a/cmirror/src/functions.c
+++ b/cmirror/src/functions.c
@@ -696,18 +696,21 @@ static int clog_resume(struct clog_tfr *tfr)
if (!lc)
return -EINVAL;
- if (lc->disk_fd == -1)
- goto out;
-
switch (lc->resume_override) {
case 1000:
LOG_ERROR("[%s] ERROR:: Additional resume issued before suspend",
SHORT_UUID(tfr->uuid));
return 0;
case 0:
- LOG_DBG("[%s] Master resume: reading disk log",
- SHORT_UUID(lc->uuid));
lc->resume_override = 1000;
+ if (lc->disk_fd == -1) {
+ LOG_DBG("[%s] Master resume.",
+ SHORT_UUID(lc->uuid));
+ goto no_disk;
+ }
+
+ LOG_DBG("[%s] Master resume: reading disk log",
+ SHORT_UUID(lc->uuid));
commit_log = 1;
break;
case 1:
@@ -753,7 +756,7 @@ static int clog_resume(struct clog_tfr *tfr)
break;
}
-out:
+no_disk:
/* If mirror has grown, set bits appropriately */
if (lc->sync == NOSYNC)
for (i = lc->disk_nr_regions; i < lc->region_count; i++)
@@ -777,7 +780,7 @@ out:
LOG_DBG("Disk log initialized");
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);
@@ -1706,7 +1709,7 @@ int log_validate(void)
(unsigned long long)lc->sync_count);
LOG_PRINT(" next zero bit = %llu",
(unsigned long long)r);
- if (r >= lc->region_count) {
+ if (r > lc->region_count) {
LOG_PRINT("ADJUSTING SYNC_COUNT");
lc->sync_count = lc->region_count;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-02 22:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-02 22:21 RHEL5 - clogd: Fix for bug 464550 - sync can get stuck after creation Jonathan Brassow
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).