cluster: RHEL5 - clogd: Minor clean-ups to last check-in
Jonathan Brassow
jbrassow@fedoraproject.org
Tue Aug 4 21:33:00 GMT 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=527b0880da57f43b3b617e95119c0ad2f7328477
Commit: 527b0880da57f43b3b617e95119c0ad2f7328477
Parent: a5692f3df1853c6a12fd97c12ddc67728be56951
Author: Jonathan Brassow <jbrassow@redhat.com>
AuthorDate: Tue Aug 4 16:25:59 2009 -0500
Committer: Jonathan Brassow <jbrassow@redhat.com>
CommitterDate: Tue Aug 4 16:32:16 2009 -0500
clogd: Minor clean-ups to last check-in
Pull unused variables and clean-up some messages.
---
cmirror-kernel/src/dm-clog.c | 5 +----
cmirror/src/functions.c | 11 ++++++-----
cmirror/src/functions.h | 2 +-
cmirror/src/local.c | 3 ++-
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/cmirror-kernel/src/dm-clog.c b/cmirror-kernel/src/dm-clog.c
index 44e2ee8..e23b687 100644
--- a/cmirror-kernel/src/dm-clog.c
+++ b/cmirror-kernel/src/dm-clog.c
@@ -105,7 +105,7 @@ static int cluster_ctr(struct dm_dirty_log *log, struct dm_target *ti,
int str_size;
int offset = (disk_log) ? 1 : 0;
char *ctr_str = NULL;
- struct log_c *lc = NULL, *tmp;
+ struct log_c *lc = NULL;
uint32_t region_size;
region_t region_count;
@@ -754,9 +754,6 @@ static int __init cluster_dirty_log_init(void)
{
int r = 0;
- INIT_LIST_HEAD(&log_list_head);
- spin_lock_init(&log_list_lock);
-
flush_entry_pool = mempool_create(100, flush_entry_alloc,
flush_entry_free, NULL);
diff --git a/cmirror/src/functions.c b/cmirror/src/functions.c
index 44c208b..f87d175 100644
--- a/cmirror/src/functions.c
+++ b/cmirror/src/functions.c
@@ -444,7 +444,7 @@ static int _clog_ctr(int argc, char **argv, uint64_t luid,
if ((dup = get_log(lc->uuid, lc->luid))) {
LOG_ERROR("Duplicate log UUID and luid!");
LOG_ERROR("UUID: %s", lc->uuid);
- LOG_ERROR("luid: %u", lc->luid);
+ LOG_ERROR("luid: %"PRIu64, lc->luid);
free(lc);
return -EINVAL;
}
@@ -452,7 +452,7 @@ static int _clog_ctr(int argc, char **argv, uint64_t luid,
if ((dup = get_pending_log(lc->uuid, lc->luid))) {
LOG_ERROR("Duplicate pending log UUID and luid!");
LOG_ERROR("UUID: %s", lc->uuid);
- LOG_ERROR("luid: %u", lc->luid);
+ LOG_ERROR("luid: %"PRIu64, lc->luid);
free(lc);
return -EINVAL;
}
@@ -886,7 +886,7 @@ int local_resume(struct clog_tfr *tfr)
* Not being able to identify a log uniquely is fatal,
* and represents a programming error.
*/
- LOG_ERROR("[%s/%u] DUPLICATE LOG WITH SAME UUID[_INSTANCE]!",
+ LOG_ERROR("[%s/%"PRIu64"] DUPLICATE LOG WITH SAME UUID[_INSTANCE]!",
SHORT_UUID(lc->uuid), lc->luid);
exit(EXIT_FAILURE);
}
@@ -1731,16 +1731,17 @@ int push_state(const char *uuid, uint64_t luid, const char *which,
if (!strncmp(which, "sync_bits", 9)) {
memcpy(*buf, lc->sync_bits, bitset_size);
- LOG_DBG("[%s] storing sync_bits (sync_count = %llu):",
+ LOG_ERROR("[%s] storing sync_bits (sync_count = %llu):",
SHORT_UUID(uuid), (unsigned long long)
count_bits32(lc->sync_bits, lc->bitset_uint32_count));
print_bits(*buf, bitset_size, 0);
} else if (!strncmp(which, "clean_bits", 9)) {
memcpy(*buf, lc->clean_bits, bitset_size);
- LOG_DBG("[%s] storing clean_bits:", SHORT_UUID(lc->uuid));
+ LOG_ERROR("[%s] storing clean_bits:", SHORT_UUID(lc->uuid));
print_bits(*buf, bitset_size, 0);
}
+ LOG_ERROR("bitset_size = %d", bitset_size);
return bitset_size;
}
diff --git a/cmirror/src/functions.h b/cmirror/src/functions.h
index 55b41bb..dee442c 100644
--- a/cmirror/src/functions.h
+++ b/cmirror/src/functions.h
@@ -7,7 +7,7 @@
#define LOG_SUSPENDED 2
int local_resume(struct clog_tfr *tfr);
-int cluster_postsuspend(char *, uint32_t);
+int cluster_postsuspend(char *, uint64_t);
int do_request(struct clog_tfr *tfr, int server);
int push_state(const char *uuid, uint64_t luid,
diff --git a/cmirror/src/local.c b/cmirror/src/local.c
index cf64855..50fb245 100644
--- a/cmirror/src/local.c
+++ b/cmirror/src/local.c
@@ -262,7 +262,8 @@ static int do_local_work(void *data)
break;
case DM_CLOG_GET_REGION_SIZE:
default:
- LOG_ERROR("Invalid log request received, ignoring.");
+ LOG_ERROR("Invalid log request (0x%x) received, ignoring.",
+ tfr->request_type);
return 0;
}
More information about the Cluster-cvs
mailing list