From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror-kernel/src dm-clog-tfr.c dm-clog.c
Date: 8 Feb 2008 14:21:05 -0000 [thread overview]
Message-ID: <20080208142105.15871.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: jbrassow at sourceware.org 2008-02-08 14:21:05
Modified files:
cmirror-kernel/src: dm-clog-tfr.c dm-clog.c
Log message:
- table an event so userspace can respond when a log device failure
occurs
- other clean-ups
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-clog-tfr.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-clog.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.8&r2=1.2.2.9
--- cluster/cmirror-kernel/src/dm-clog-tfr.c 2008/01/14 22:46:58 1.1.2.4
+++ cluster/cmirror-kernel/src/dm-clog-tfr.c 2008/02/08 14:21:04 1.1.2.5
@@ -72,6 +72,7 @@
static void cn_clog_callback(void *data)
{
+ int found = 0;
struct cn_msg *msg = (struct cn_msg *)data;
struct clog_tfr *tfr = (struct clog_tfr *)(msg + 1);
struct recieving_pkg *pkg;
@@ -100,13 +101,16 @@
memcpy(pkg->data, tfr->data, tfr->data_size);
*(pkg->data_size) = tfr->data_size;
}
-
+ found = 1;
complete(&pkg->complete);
break;
}
}
spin_unlock(&recieving_list_lock);
+ if (!found)
+ DMERR("Stray request returned: %s, %llu",
+ RQ_TYPE(tfr->request_type), tfr->seq);
}
/*
@@ -123,7 +127,6 @@
*
* Returns: 0 on success, -EXXX on failure
*/
-static uint32_t foo[15]; /* FIXME: Pull this... Track number of sec */
int dm_clog_consult_server(const char *uuid, int request_type,
char *data, int data_size,
char *rdata, int *rdata_size)
@@ -180,29 +183,22 @@
goto out;
}
- r = wait_for_completion_timeout(&(pkg.complete), 5 * HZ);
+ r = wait_for_completion_timeout(&(pkg.complete), 15 * HZ);
if (!r) {
- DMWARN("Timed out waiting for cluster log server [%s]",
- RQ_TYPE(request_type));
- DMWARN("Retrying request [%s]", RQ_TYPE(request_type));
+ DMWARN("Request timed out on %s:%llu - retrying",
+ RQ_TYPE(request_type), pkg.seq);
spin_lock(&recieving_list_lock);
list_del_init(&(pkg.list));
spin_unlock(&recieving_list_lock);
- foo[10]++;
- DMWARN("[%u][%u][%u][%u][%u][%u] [%u]",
- foo[0], foo[1], foo[2], foo[3], foo[4], foo[5],
- foo[10]);
-
goto resend;
} else {
/* FIXME: Pull time checking code - it's just for profiling */
pkg.start_time = (jiffies - pkg.start_time);
do_div(pkg.start_time, HZ);
- if ((pkg.start_time < 0) || (pkg.start_time >= 5))
- DMWARN("OUT-OF-BOUNDS:: pkg.start_time == %llu", pkg.start_time);
- else
- foo[pkg.start_time]++;
+ if (pkg.start_time > 0)
+ DMWARN("Excessive delay in request processing, %llu sec for %s",
+ pkg.start_time, RQ_TYPE(request_type));
}
r = pkg.error;
if (r)
--- cluster/cmirror-kernel/src/dm-clog.c 2008/01/25 16:23:24 1.2.2.8
+++ cluster/cmirror-kernel/src/dm-clog.c 2008/02/08 14:21:04 1.2.2.9
@@ -425,16 +425,8 @@
goto fail;
}
- do {
- r = cluster_do_request(lc, lc->uuid, DM_CLOG_FLUSH,
- NULL, 0, NULL, NULL);
- if (r != -EAGAIN)
- break;
-
- DMINFO("Flush conflicts with recovery [delaying]");
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ/4);
- } while (1);
+ r = cluster_do_request(lc, lc->uuid, DM_CLOG_FLUSH,
+ NULL, 0, NULL, NULL);
fail:
/*
@@ -447,6 +439,9 @@
mempool_free(fe, flush_entry_pool);
}
+ if (r)
+ dm_table_event(lc->ti->table);
+
return r;
}
next reply other threads:[~2008-02-08 14:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 14:21 jbrassow [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-14 22:46 [Cluster-devel] cluster/cmirror-kernel/src dm-clog-tfr.c dm-clog.c jbrassow
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=20080208142105.15871.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 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 NNTP newsgroup(s).