cluster/cmirror-kernel/src dm-cmirror-client.c ...
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
cmirror-kernel/src/Attic/dm-cmirror-client.c +4 -12
@@ -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 ){
cmirror-kernel/src/Attic/dm-cmirror-server.c +20 -19
@@ -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 =