From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c ...
Date: 7 Dec 2006 18:58:34 -0000 [thread overview]
Message-ID: <20061207185834.1629.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: jbrassow at sourceware.org 2006-12-07 18:58:32
Modified files:
cmirror-kernel/src: dm-cmirror-client.c dm-cmirror-server.c
Log message:
Get rid of a number of unnecessary messages, which spray to the console
during errors and cause the mirror reconfiguration to take a long time.
(Even been seen to cause machines to be fenced if the load is too great.)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-client.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.32&r2=1.1.2.33
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-server.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.17&r2=1.1.2.18
--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c 2006/12/05 17:49:08 1.1.2.32
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c 2006/12/07 18:58:32 1.1.2.33
@@ -905,9 +905,8 @@
spin_lock(®ion_state_lock);
list_for_each_entry_safe(rs, tmp_rs, &clear_region_list, rs_list){
if(lc == rs->rs_lc && region == rs->rs_region){
-#ifdef DEBUG
- DMINFO("Mark pre-empting clear of region %Lu", region);
-#endif
+ DMDEBUG("Mark pre-empting clear (%Lu/%s)",
+ region, lc->uuid + (strlen(lc->uuid) - 8));
list_del_init(&rs->rs_list);
list_add(&rs->rs_list, &marked_region_list);
clear_region_count--;
@@ -1023,7 +1022,7 @@
** clearing without ever marking..................................... */
if(!rs_new){
- DMERR("Unable to allocate region_state for mark.");
+ DMERR("Unable to allocate region_state for clear.");
BUG();
}
@@ -1058,9 +1057,6 @@
while(consult_server(lc, region, LRT_COMPLETE_RESYNC_WORK, &success_tmp)){
DMWARN("unable to notify server of completed resync work");
}
- if (!success)
- DMERR("Attempting to revert sync status of region #%llu", region);
-
return;
}
@@ -1069,11 +1065,7 @@
int i;
region_t rtn;
struct log_c *lc = (struct log_c *) log->context;
-/* take out optimization
- if(atomic_read(&lc->in_sync) == 1){
- return lc->region_count;
- }
-*/
+
/* Try to get sync count up to five times */
for (i = 0; i < 5 && consult_server(lc, 0, LRT_GET_SYNC_COUNT, &rtn); i++);
if(i >= 5){
--- cluster/cmirror-kernel/src/Attic/dm-cmirror-server.c 2006/09/05 17:50:11 1.1.2.17
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-server.c 2006/12/07 18:58:32 1.1.2.18
@@ -522,8 +522,8 @@
}
} else if (ru->ru_rw == RU_RECOVER) {
DMINFO("Attempt to mark a region " SECTOR_FORMAT
- ", which is being recovered.",
- lr->u.lr_region);
+ "/%s which is being recovered.",
+ lr->u.lr_region, lc->uuid + (strlen(lc->uuid) - 8));
DMINFO("Current recoverer: %u", ru->ru_nodeid);
DMINFO("Mark requester : %u", who);
@@ -534,8 +534,8 @@
} else {
DMWARN("Attempt to mark a already marked region (%u,"
SECTOR_FORMAT
- ")",
- who, lr->u.lr_region);
+ "/%s)",
+ who, lr->u.lr_region, lc->uuid + (strlen(lc->uuid) - 8));
mempool_free(new, region_user_pool);
}
@@ -595,8 +595,6 @@
static int server_complete_resync_work(struct log_c *lc, struct log_request *lr, int success){
- uint32_t info;
-
if (lr->u.lr_region > lc->region_count) {
return -EINVAL;
}
@@ -610,30 +608,33 @@
lc->sync_count++;
}
} else if (log_test_bit(lc->sync_bits, lr->u.lr_region)) {
- DMERR("complete_resync_work region going out-of-sync: disk failure");
/* gone for now: lc->sync_count--; */
log_clear_bit(lc, lc->sync_bits, lr->u.lr_region);
}
- info = (uint32_t)(lc->region_count - lc->sync_count);
-
- if((info < 10001 && !(info%1000)) ||
- (info < 1000 && !(info%100)) ||
- (info < 200 && !(info%25)) ||
- (info < 6)){
- DMDEBUG(SECTOR_FORMAT " out-of-sync regions remaining for %s.",
- lc->region_count - lc->sync_count,
- lc->uuid + (strlen(lc->uuid) - 8));
- }
return 0;
}
static int server_get_sync_count(struct log_c *lc, struct log_request *lr){
+ if (lc->sync_count > lc->region_count) {
+ DMERR("sync_count (" SECTOR_FORMAT ") > region_count (" SECTOR_FORMAT ") in %s!",
+ lc->sync_count, lc->region_count, lc->uuid + (strlen(lc->uuid) - 8));
+ disk_resume(lc);
+ }
+
lr->u.lr_region_rtn = lc->sync_count;
return 0;
}
+static void report_duplicate_log(struct log_c *lc)
+{
+ DMERR("HEY!!! There are two matches for %s",
+ lc->uuid + (strlen(lc->uuid) - 8));
+ list_for_each_entry(lc, &log_list_head, log_list) {
+ DMERR(" %s", lc->uuid + (strlen(lc->uuid) - 8));
+ }
+}
static struct log_c *get_log_context(char *uuid){
struct log_c *lc, *r = NULL;
@@ -641,8 +642,7 @@
list_for_each_entry(lc, &log_list_head, log_list){
if(!strncmp(lc->uuid, uuid, MAX_NAME_LEN)){
if (r)
- DMERR("HEY!!! There are two matches for %s",
- lc->uuid + (strlen(lc->uuid) - 8));
+ report_duplicate_log(lc);
else
r = lc;
}
@@ -932,6 +932,7 @@
break;
}
error = server_mark_region(lc, &lr, nodeid);
+ lr.u.lr_int_rtn = 0;
break;
case LRT_CLEAR_REGION:
if(!(nodeid =
next reply other threads:[~2006-12-07 18:58 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 18:58 jbrassow [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-03 19:02 [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c jbrassow
2007-09-27 20:31 jbrassow
2007-09-26 3:15 jbrassow
2007-09-21 20:07 jbrassow
2007-09-13 15:24 jbrassow
2007-07-11 16:18 jbrassow
2007-04-26 16:55 jbrassow
2007-04-26 16:54 jbrassow
2007-04-24 20:10 jbrassow
2007-04-24 20:08 jbrassow
2007-04-10 7:13 jbrassow
2007-04-10 7:12 jbrassow
2007-04-05 21:33 jbrassow
2007-04-05 21:32 jbrassow
2007-04-03 18:23 jbrassow
2007-04-03 18:21 jbrassow
2007-03-22 22:34 jbrassow
2007-03-22 22:22 jbrassow
2007-03-14 4:28 jbrassow
2007-02-26 17:38 jbrassow
2007-02-20 19:35 jbrassow
2007-02-19 16:29 jbrassow
2007-02-14 17:44 jbrassow
2007-02-02 17:22 jbrassow
2007-01-08 19:28 jbrassow
2006-09-05 17:50 jbrassow
2006-09-05 17:48 jbrassow
2006-07-27 23:11 jbrassow
2006-07-27 23:11 jbrassow
2006-07-22 22:19 jbrassow
2006-07-22 22:19 jbrassow
2006-07-22 22:12 jbrassow
2006-06-29 19:49 jbrassow
2006-06-29 19:48 jbrassow
2006-06-29 19:46 jbrassow
2006-06-27 20:19 jbrassow
2006-06-15 19:48 jbrassow
2006-06-15 19:34 jbrassow
2006-06-13 16:26 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=20061207185834.1629.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).