From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c ...
Date: 2 Feb 2007 17:22:56 -0000 [thread overview]
Message-ID: <20070202172256.30759.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: jbrassow at sourceware.org 2007-02-02 17:22:55
Modified files:
cmirror-kernel/src: dm-cmirror-client.c dm-cmirror-server.c
Log message:
- Fix for bug #225337
Reset 'sync_search' if (lc->sync_search >= lc->region_count) &&
(lc->sync_count < lc->region_count). It indicates that a failure
during recovery has taken place, and we are likely able to handle
it.
Also, do not issue clear/mark region requests if it is already
known that the log device has failed.
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.34&r2=1.1.2.35
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.19&r2=1.1.2.20
--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c 2007/01/08 19:28:26 1.1.2.34
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c 2007/02/02 17:22:55 1.1.2.35
@@ -568,7 +568,7 @@
** while we are here. If the clear region request fails, it**
** would be re-added - perhaps prematurely clearing the bit */
- if(rs){
+ if(rs && !rs->rs_lc->log_dev_failed){
_consult_server(rs->rs_lc, rs->rs_region,
LRT_CLEAR_REGION, NULL, &retry);
@@ -951,33 +951,35 @@
spin_unlock(®ion_state_lock);
- while((error = consult_server(lc, region, LRT_MARK_REGION, NULL))){
- if (error == -EBUSY) {
- /* Remote recovering delay and try again */
- DMDEBUG("Delaying mark to region %Lu, due to recovery",
- region);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ/2);
- continue;
- }
+ if (!lc->log_dev_failed) {
+ while((error = consult_server(lc, region, LRT_MARK_REGION, NULL))){
+ if (error == -EBUSY) {
+ /* Remote recovering delay and try again */
+ DMDEBUG("Delaying mark to region %Lu, due to recovery",
+ region);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ/2);
+ continue;
+ }
- if (error == -EIO) {
- lc->log_dev_failed = 1;
- break;
+ if (error == -EIO) {
+ lc->log_dev_failed = 1;
+ break;
+ }
+ DMWARN("unable to get server (%u) to mark region (%Lu)",
+ lc->server_id, region);
+ DMWARN("Reason :: %d", error);
}
- DMWARN("unable to get server (%u) to mark region (%Lu)",
- lc->server_id, region);
- DMWARN("Reason :: %d", error);
- }
- if (lc->log_dev_failed) {
- dm_table_event(lc->ti->table);
- /*
- DMERR("Write failed on mirror log device, %s",
- lc->log_dev->name);
- if (!atomic_read(&lc->suspended))
- wait_for_completion(&lc->failure_completion);
- */
+ if (lc->log_dev_failed) {
+ dm_table_event(lc->ti->table);
+ /*
+ DMERR("Write failed on mirror log device, %s",
+ lc->log_dev->name);
+ if (!atomic_read(&lc->suspended))
+ wait_for_completion(&lc->failure_completion);
+ */
+ }
}
return;
}
--- cluster/cmirror-kernel/src/Attic/dm-cmirror-server.c 2007/01/08 19:28:26 1.1.2.19
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-server.c 2007/02/02 17:22:55 1.1.2.20
@@ -224,8 +224,16 @@
static int _core_get_resync_work(struct log_c *lc, region_t *region)
{
- if (lc->sync_search >= lc->region_count){
- return 0;
+ if (lc->sync_search >= lc->region_count) {
+ /*
+ * FIXME: pvmove is not supported yet, but when it is,
+ * an audit of sync_count changes will need to be made
+ */
+ if (lc->sync_count < lc->region_count) {
+ lc->sync_search = 0;
+ } else {
+ return 0;
+ }
}
do {
*region = ext2_find_next_zero_bit((unsigned long *) lc->sync_bits,
@@ -557,9 +565,12 @@
if(!find_ru_by_region(lc, lr->u.lr_region)){
log_set_bit(lc, lc->clean_bits, lr->u.lr_region);
+ write_bits(lc);
+ /*
if (write_bits(lc))
DMERR("Write bits failed on mirror log device, %s",
lc->log_dev->name);
+ */
}
return 0;
}
next reply other threads:[~2007-02-02 17:22 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-02 17:22 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-01-08 19:28 jbrassow
2006-12-07 18:58 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=20070202172256.30759.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.