public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* RHEL5 - clogd: Optimization - ACK 'clear region' request before sending to cluster
@ 2008-08-28 7:34 Jonathan Brassow
0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2008-08-28 7:34 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d437c7e1272941498e90d8ab939ca91b530f5d1f
Commit: d437c7e1272941498e90d8ab939ca91b530f5d1f
Parent: 29b4608b93abf8517b735c9c7065c96f8be1c529
Author: Jonathan Brassow <jbrassow@redhat.com>
AuthorDate: Wed Aug 27 14:48:04 2008 -0500
Committer: Jonathan Brassow <jbrassow@redhat.com>
CommitterDate: Wed Aug 27 14:48:04 2008 -0500
clogd: Optimization - ACK 'clear region' request before sending to cluster
Make CLEAR_REGION requests (a often issued request) faster.
---
cmirror/src/cluster.c | 3 ++-
cmirror/src/local.c | 18 +++++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/cmirror/src/cluster.c b/cmirror/src/cluster.c
index 68ffefb..be8a5b9 100644
--- a/cmirror/src/cluster.c
+++ b/cmirror/src/cluster.c
@@ -177,7 +177,8 @@ static int handle_cluster_request(struct clog_tfr *tfr, int server, int printz)
(tfr->originator == my_cluster_id))
r = do_request(tfr, server);
- if (server) {
+ if (server &&
+ (tfr->request_type != DM_CLOG_CLEAR_REGION)) {
tfr->request_type |= DM_CLOG_RESPONSE;
/*
diff --git a/cmirror/src/local.c b/cmirror/src/local.c
index 0a65870..aa5b6e7 100644
--- a/cmirror/src/local.c
+++ b/cmirror/src/local.c
@@ -258,7 +258,6 @@ static int do_local_work(void *data)
case DM_CLOG_IS_CLEAN:
case DM_CLOG_FLUSH:
case DM_CLOG_MARK_REGION:
- case DM_CLOG_CLEAR_REGION:
case DM_CLOG_GET_RESYNC_WORK:
case DM_CLOG_SET_REGION_SYNC:
case DM_CLOG_IS_REMOTE_RECOVERING:
@@ -280,6 +279,23 @@ static int do_local_work(void *data)
}
break;
+ case DM_CLOG_CLEAR_REGION:
+ r = kernel_ack(tfr->seq, 0);
+
+ r = cluster_send(tfr);
+ if (r) {
+ LOG_ERROR("[%s] Unable to send %s to cluster: %s",
+ SHORT_UUID(tfr->uuid),
+ RQ_TYPE(tfr->request_type), strerror(-r));
+ /*
+ * FIXME: store error for delivery on flush
+ * This would allow us to optimize MARK_REGION
+ * too.
+ */
+ }
+ queue_add_tail(tfr, free_queue);
+
+ break;
case DM_CLOG_GET_REGION_SIZE:
default:
LOG_ERROR("Invalid log request received, ignoring.");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-27 19:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-28 7:34 RHEL5 - clogd: Optimization - ACK 'clear region' request before sending to cluster 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).