From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c
Date: 8 Sep 2006 15:52:41 -0000 [thread overview]
Message-ID: <20060908155241.30449.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4U4
Changes by: jbrassow at sourceware.org 2006-09-08 15:52:41
Modified files:
cmirror-kernel/src: dm-cmirror-client.c
Log message:
- remove speed-bump that was put in for debugging
- delete 'marked region requests' when destructor is called
The regions have been marked on disk, but the memory struct
tracking that mark needs to be freed if a dtr comes along
before a 'clear region request'. This can happen when a
mirror image fails.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-client.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.1.2.19.2.5&r2=1.1.2.19.2.6
--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c 2006/09/05 17:48:02 1.1.2.19.2.5
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c 2006/09/08 15:52:40 1.1.2.19.2.6
@@ -528,7 +528,7 @@
goto out;
} else {
DMINFO("Continuing request:: %s",
- (type == LRT_IS_CLEAN)? "LRT_IS_C LEAN":
+ (type == LRT_IS_CLEAN)? "LRT_IS_CLEAN":
(type == LRT_IN_SYNC)? "LRT_IN_SYNC":
(type == LRT_MARK_REGION)? "LRT_MARK_REGION":
(type == LRT_GET_RESYNC_WORK)? "LRT_GET_RESYNC_WORK":
@@ -732,6 +732,7 @@
static void cluster_dtr(struct dirty_log *log)
{
struct log_c *lc = (struct log_c *) log->context;
+ struct region_state *rs, *tmp_rs;
if (!list_empty(&clear_region_list))
DMINFO("Leaving while clear region requests remain.");
@@ -742,6 +743,20 @@
sock_release(lc->client_sock);
+ spin_lock(®ion_state_lock);
+
+ list_for_each_entry_safe(rs, tmp_rs, &clear_region_list, rs_list) {
+ if (lc == rs->rs_lc)
+ list_del_init(&rs->rs_list);
+ }
+
+ list_for_each_entry_safe(rs, tmp_rs, &marked_region_list, rs_list) {
+ if (lc == rs->rs_lc)
+ list_del_init(&rs->rs_list);
+ }
+
+ spin_unlock(®ion_state_lock);
+
if (lc->log_dev)
disk_dtr(log);
else
@@ -758,7 +773,6 @@
static int cluster_postsuspend(struct dirty_log *log)
{
- int r;
struct log_c *lc = (struct log_c *) log->context;
while (1) {
@@ -876,6 +890,8 @@
rs_new = mempool_alloc(region_state_pool, GFP_KERNEL);
+ memset(rs_new, 0, sizeof(struct region_state));
+
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){
@@ -950,6 +966,8 @@
rs_new = mempool_alloc(region_state_pool, GFP_ATOMIC);
+ memset(rs_new, 0, sizeof(struct region_state));
+
spin_lock(®ion_state_lock);
list_for_each_entry_safe(rs, tmp_rs, &clear_region_list, rs_list){
@@ -968,9 +986,6 @@
list_del_init(&rs->rs_list);
list_add(&rs->rs_list, &clear_region_list);
clear_region_count++;
- if(!(clear_region_count & 0x7F)){
- DMINFO("clear_region_count :: %d", clear_region_count);
- }
spin_unlock(®ion_state_lock);
if (rs_new)
mempool_free(rs_new, region_state_pool);
@@ -1017,11 +1032,8 @@
while(consult_server(lc, region, LRT_COMPLETE_RESYNC_WORK, &success_tmp)){
DMWARN("unable to notify server of completed resync work");
}
- if (!success) {
+ if (!success)
DMERR("Attempting to revert sync status of region #%llu", region);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ/5);
- }
return;
}
next reply other threads:[~2006-09-08 15:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-08 15:52 jbrassow [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-23 16:51 [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c jbrassow
2007-05-09 21:44 jbrassow
2007-03-02 22:31 jbrassow
2006-12-05 17:49 jbrassow
2006-12-05 15:08 jbrassow
2006-12-05 3:13 jbrassow
2006-11-27 23:15 jbrassow
2006-11-27 22:36 jbrassow
2006-11-07 20:48 jbrassow
2006-10-24 21:04 jbrassow
2006-09-08 15:54 jbrassow
2006-07-07 17:12 jbrassow
2006-07-07 17:09 jbrassow
2006-07-07 17:08 jbrassow
2006-06-15 17:53 jbrassow
2006-06-15 17:44 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=20060908155241.30449.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).