[Ocfs2-commits] khackel commits r2831 - branches/ocfs2-1.2-cert/patches

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Fri Apr 7 15:54:35 CDT 2006


Author: khackel
Signed-off-by: jlbec
Date: 2006-04-07 15:54:34 -0500 (Fri, 07 Apr 2006)
New Revision: 2831

Modified:
   branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch
   branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry
   branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes
   branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs
   branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch
Log:
try to fix frozen work thread
Signed-off-by: jlbec

Modified: branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch	2006-04-07 02:07:55 UTC (rev 2830)
+++ branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch	2006-04-07 20:54:34 UTC (rev 2831)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmconvert.c
+Index: cert2/fs/ocfs2/dlm/dlmconvert.c
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmconvert.c	2006-04-06 15:04:31.516055000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmconvert.c	2006-04-06 17:44:33.459840000 -0700
-@@ -467,6 +467,12 @@ int dlm_convert_lock_handler(struct o2ne
+--- cert2.orig/fs/ocfs2/dlm/dlmconvert.c	2006-04-07 13:41:18.858200000 -0700
++++ cert2/fs/ocfs2/dlm/dlmconvert.c	2006-04-07 13:50:57.070240000 -0700
+@@ -467,6 +467,12 @@
  	}
  
  	spin_lock(&res->spinlock);
@@ -15,7 +15,7 @@
  	list_for_each(iter, &res->granted) {
  		lock = list_entry(iter, struct dlm_lock, list);
  		if (lock->ml.cookie == cnv->cookie &&
-@@ -476,6 +482,20 @@ int dlm_convert_lock_handler(struct o2ne
+@@ -476,6 +482,20 @@
  		}
  		lock = NULL;
  	}
@@ -36,11 +36,11 @@
  	spin_unlock(&res->spinlock);
  	if (!lock) {
  		status = DLM_IVLOCKID;
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmrecovery.c	2006-04-06 15:04:37.799059000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c	2006-04-06 15:04:38.613808000 -0700
-@@ -485,7 +485,7 @@ void dlm_wait_for_recovery(struct dlm_ct
+--- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c	2006-04-07 13:49:28.604440000 -0700
++++ cert2/fs/ocfs2/dlm/dlmrecovery.c	2006-04-07 13:50:57.085240000 -0700
+@@ -494,7 +494,7 @@
  		     dlm->reco.dead_node);
  		//dlm_print_reco_junk(dlm);
  	}
@@ -49,7 +49,7 @@
  	while (1) {
  		if (wait_event_timeout(dlm->reco.event, 
  				       !dlm_in_recovery(dlm), 
-@@ -498,7 +498,8 @@ void dlm_wait_for_recovery(struct dlm_ct
+@@ -507,7 +507,8 @@
  		     dlm->reco.dead_node);
  		//dlm_print_reco_junk(dlm);
  	}
@@ -59,7 +59,7 @@
  }
  
  static void dlm_begin_recovery(struct dlm_ctxt *dlm)
-@@ -749,12 +750,11 @@ static int dlm_remaster_locks(struct dlm
+@@ -758,12 +759,11 @@
  					break;
  				case DLM_RECO_NODE_DATA_RECEIVING:
  				case DLM_RECO_NODE_DATA_REQUESTED:
@@ -76,11 +76,11 @@
  					mlog(mlg, "%s: node %u still in state %s\n",
  					     dlm->name, ndata->node_num,
  					     ndata->state==DLM_RECO_NODE_DATA_RECEIVING ?
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c
+Index: cert2/fs/ocfs2/dlm/dlmmaster.c
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmmaster.c	2006-04-06 15:04:37.778080000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c	2006-04-06 15:04:38.633808000 -0700
-@@ -1694,13 +1694,13 @@ again:
+--- cert2.orig/fs/ocfs2/dlm/dlmmaster.c	2006-04-07 13:41:18.939200000 -0700
++++ cert2/fs/ocfs2/dlm/dlmmaster.c	2006-04-07 13:50:57.101240000 -0700
+@@ -1694,13 +1694,13 @@
  		tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key,
  					    &assert, sizeof(assert), to, &r);
  		if (tmpret < 0) {
@@ -97,7 +97,7 @@
  			/* any nonzero status return will do */
  			ret = tmpret;
  		} else if (r < 0) {
-@@ -2086,7 +2086,8 @@ void dlm_assert_master_worker(struct dlm
+@@ -2086,7 +2086,8 @@
  				   nodemap, flags);
  	if (ret < 0) {
  		/* no need to restart, we are done */
@@ -107,7 +107,7 @@
  	}
  
  	/* Ok, we've asserted ourselves.  Let's let migration start. */
-@@ -2861,7 +2862,7 @@ top:
+@@ -2861,7 +2862,7 @@
  				 * may result in the mle being unlinked and
  				 * freed, but there may still be a process
  				 * waiting in the dlmlock path which is fine. */

Modified: branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry	2006-04-07 02:07:55 UTC (rev 2830)
+++ branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry	2006-04-07 20:54:34 UTC (rev 2831)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.c
+Index: cert2/fs/ocfs2/dlm/dlmdebug.c
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdebug.c	2006-04-06 14:36:26.180619000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.c	2006-04-06 14:36:28.125977000 -0700
-@@ -58,6 +58,9 @@ static int dlm_parse_domain_and_lockres(
+--- cert2.orig/fs/ocfs2/dlm/dlmdebug.c	2006-04-07 13:41:16.378842000 -0700
++++ cert2/fs/ocfs2/dlm/dlmdebug.c	2006-04-07 13:51:00.352280000 -0700
+@@ -58,6 +58,9 @@
  					struct dlm_ctxt **dlm,
  					struct dlm_lock_resource **res);
  
@@ -12,7 +12,7 @@
  typedef int (dlm_debug_func_t)(const char __user *data, unsigned int len);
  
  struct dlm_debug_funcs
-@@ -114,6 +117,8 @@ static struct file_operations dlm_debug_
+@@ -114,6 +117,8 @@
  
  #define OCFS2_DLM_PROC_PATH "fs/ocfs2_dlm"
  #define DLM_DEBUG_PROC_NAME "debug"
@@ -21,7 +21,7 @@
  static struct proc_dir_entry *ocfs2_dlm_proc;
  
  void dlm_remove_proc(void)
-@@ -140,6 +145,52 @@ void dlm_init_proc(void)
+@@ -140,6 +145,52 @@
  		entry->proc_fops = &dlm_debug_operations;
  }
  
@@ -74,10 +74,10 @@
  /* lock resource printing is usually very important (printed
   * right before a BUG in some cases), but we'd like to be
   * able to shut it off if needed, hence the KERN_NOTICE level */
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.h
+Index: cert2/fs/ocfs2/dlm/dlmdebug.h
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdebug.h	2006-03-27 14:36:39.750164000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.h	2006-04-06 14:36:28.131977000 -0700
+--- cert2.orig/fs/ocfs2/dlm/dlmdebug.h	2006-04-07 13:41:16.455842000 -0700
++++ cert2/fs/ocfs2/dlm/dlmdebug.h	2006-04-07 13:51:00.358280000 -0700
 @@ -28,5 +28,7 @@
  void dlm_remove_proc(void);
  void dlm_init_proc(void);
@@ -86,11 +86,11 @@
 +void dlm_proc_del_domain(struct dlm_ctxt *dlm);
  
  #endif
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c
+Index: cert2/fs/ocfs2/dlm/dlmdomain.c
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdomain.c	2006-04-06 14:36:27.193298000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c	2006-04-06 14:36:28.145978000 -0700
-@@ -193,6 +193,8 @@ static int dlm_wait_on_domain_helper(con
+--- cert2.orig/fs/ocfs2/dlm/dlmdomain.c	2006-04-07 13:41:16.465840000 -0700
++++ cert2/fs/ocfs2/dlm/dlmdomain.c	2006-04-07 13:51:00.369280000 -0700
+@@ -193,6 +193,8 @@
  
  static void dlm_free_ctxt_mem(struct dlm_ctxt *dlm)
  {
@@ -99,7 +99,7 @@
  	if (dlm->lockres_hash)
  		free_page((unsigned long) dlm->lockres_hash);
  
-@@ -1278,6 +1280,8 @@ static struct dlm_ctxt *dlm_alloc_ctxt(c
+@@ -1278,6 +1280,8 @@
  
  	INIT_LIST_HEAD(&dlm->dlm_eviction_callbacks);
  
@@ -108,11 +108,11 @@
  	mlog(0, "context init: refcount %u\n",
  		  atomic_read(&dlm->dlm_refs.refcount));
  
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmcommon.h
+Index: cert2/fs/ocfs2/dlm/dlmcommon.h
 ===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmcommon.h	2006-04-06 14:36:27.176298000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmcommon.h	2006-04-06 15:00:08.719305000 -0700
-@@ -107,6 +107,8 @@ struct dlm_ctxt
+--- cert2.orig/fs/ocfs2/dlm/dlmcommon.h	2006-04-07 13:41:16.473842000 -0700
++++ cert2/fs/ocfs2/dlm/dlmcommon.h	2006-04-07 13:51:00.377280000 -0700
+@@ -107,6 +107,8 @@
  	struct list_head master_list;
  	struct list_head mle_hb_events;
  

Modified: branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes
===================================================================
--- branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes	2006-04-07 02:07:55 UTC (rev 2830)
+++ branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes	2006-04-07 20:54:34 UTC (rev 2831)
@@ -1,7 +1,7 @@
 Index: cert2/fs/ocfs2/cluster/heartbeat.c
 ===================================================================
---- cert2.orig/fs/ocfs2/cluster/heartbeat.c	2006-04-06 10:58:02.886917000 -0700
-+++ cert2/fs/ocfs2/cluster/heartbeat.c	2006-04-06 11:02:07.746469000 -0700
+--- cert2.orig/fs/ocfs2/cluster/heartbeat.c	2006-04-07 13:41:22.896920000 -0700
++++ cert2/fs/ocfs2/cluster/heartbeat.c	2006-04-07 13:50:48.227120000 -0700
 @@ -931,12 +931,14 @@
  	struct o2hb_bio_wait_ctxt write_wc;
  	struct timeval start;

Modified: branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs
===================================================================
--- branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs	2006-04-07 02:07:55 UTC (rev 2830)
+++ branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs	2006-04-07 20:54:34 UTC (rev 2831)
@@ -1,7 +1,7 @@
 Index: cert2/fs/ocfs2/extent_map.c
 ===================================================================
---- cert2.orig/fs/ocfs2/extent_map.c	2006-04-06 10:57:58.833253000 -0700
-+++ cert2/fs/ocfs2/extent_map.c	2006-04-06 11:02:14.033370000 -0700
+--- cert2.orig/fs/ocfs2/extent_map.c	2006-04-07 13:41:20.182692000 -0700
++++ cert2/fs/ocfs2/extent_map.c	2006-04-07 13:50:54.072200000 -0700
 @@ -581,7 +581,7 @@
  
  	ret = -ENOMEM;
@@ -30,8 +30,8 @@
  		}
 Index: cert2/fs/ocfs2/journal.c
 ===================================================================
---- cert2.orig/fs/ocfs2/journal.c	2006-04-06 10:57:58.905181000 -0700
-+++ cert2/fs/ocfs2/journal.c	2006-04-06 11:02:14.053350000 -0700
+--- cert2.orig/fs/ocfs2/journal.c	2006-04-07 13:41:20.387561000 -0700
++++ cert2/fs/ocfs2/journal.c	2006-04-07 13:50:54.085200000 -0700
 @@ -117,7 +117,7 @@
  {
  	struct ocfs2_journal_handle *retval = NULL;
@@ -52,8 +52,8 @@
  		 * skipping local alloc cleanup as fsck.ocfs2 is more
 Index: cert2/fs/ocfs2/cluster/nodemanager.c
 ===================================================================
---- cert2.orig/fs/ocfs2/cluster/nodemanager.c	2006-04-06 10:57:58.977108000 -0700
-+++ cert2/fs/ocfs2/cluster/nodemanager.c	2006-04-06 11:02:14.063340000 -0700
+--- cert2.orig/fs/ocfs2/cluster/nodemanager.c	2006-04-07 13:41:20.458561000 -0700
++++ cert2/fs/ocfs2/cluster/nodemanager.c	2006-04-07 13:50:54.096200000 -0700
 @@ -550,7 +550,7 @@
  	if (strlen(name) > O2NM_MAX_NAME_LEN)
  		goto out; /* ENAMETOOLONG */
@@ -78,8 +78,8 @@
  		goto out;
 Index: cert2/fs/ocfs2/cluster/heartbeat.c
 ===================================================================
---- cert2.orig/fs/ocfs2/cluster/heartbeat.c	2006-04-06 11:02:07.746469000 -0700
-+++ cert2/fs/ocfs2/cluster/heartbeat.c	2006-04-06 11:02:14.076327000 -0700
+--- cert2.orig/fs/ocfs2/cluster/heartbeat.c	2006-04-07 13:50:48.227120000 -0700
++++ cert2/fs/ocfs2/cluster/heartbeat.c	2006-04-07 13:50:54.109201000 -0700
 @@ -481,7 +481,7 @@
  	o2hb_compute_request_limits(reg, max_slots, &num_bios, &slots_per_bio);
  
@@ -143,8 +143,8 @@
  
 Index: cert2/fs/ocfs2/cluster/net_proc.c
 ===================================================================
---- cert2.orig/fs/ocfs2/cluster/net_proc.c	2006-04-06 10:57:59.122078000 -0700
-+++ cert2/fs/ocfs2/cluster/net_proc.c	2006-04-06 11:02:14.083320000 -0700
+--- cert2.orig/fs/ocfs2/cluster/net_proc.c	2006-04-07 13:41:20.603560000 -0700
++++ cert2/fs/ocfs2/cluster/net_proc.c	2006-04-07 13:50:54.117200000 -0700
 @@ -156,7 +156,7 @@
  	struct seq_file *seq;
  	int ret;
@@ -165,8 +165,8 @@
  		goto out;
 Index: cert2/fs/ocfs2/vote.c
 ===================================================================
---- cert2.orig/fs/ocfs2/vote.c	2006-04-06 10:57:59.194080000 -0700
-+++ cert2/fs/ocfs2/vote.c	2006-04-06 11:02:14.092311000 -0700
+--- cert2.orig/fs/ocfs2/vote.c	2006-04-07 13:41:20.674561000 -0700
++++ cert2/fs/ocfs2/vote.c	2006-04-07 13:50:54.126200000 -0700
 @@ -598,7 +598,7 @@
  {
  	struct ocfs2_net_wait_ctxt *w;

Modified: branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch	2006-04-07 02:07:55 UTC (rev 2830)
+++ branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch	2006-04-07 20:54:34 UTC (rev 2831)
@@ -1,7 +1,7 @@
 Index: cert2/fs/ocfs2/dlm/dlmcommon.h
 ===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmcommon.h	2006-04-06 10:57:49.159287000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmcommon.h	2006-04-06 10:57:49.376287000 -0700
+--- cert2.orig/fs/ocfs2/dlm/dlmcommon.h	2006-04-07 13:41:12.673120000 -0700
++++ cert2/fs/ocfs2/dlm/dlmcommon.h	2006-04-07 13:41:16.473842000 -0700
 @@ -121,12 +121,13 @@
  	struct o2hb_callback_func dlm_hb_down;
  	struct task_struct *dlm_thread_task;
@@ -30,8 +30,8 @@
  void dlm_put(struct dlm_ctxt *dlm);
 Index: cert2/fs/ocfs2/dlm/dlmdomain.c
 ===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmdomain.c	2006-04-06 10:57:49.265288000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmdomain.c	2006-04-06 10:57:49.387288000 -0700
+--- cert2.orig/fs/ocfs2/dlm/dlmdomain.c	2006-04-07 13:41:12.784121000 -0700
++++ cert2/fs/ocfs2/dlm/dlmdomain.c	2006-04-07 13:41:16.465840000 -0700
 @@ -290,6 +290,7 @@
  	dlm_unregister_domain_handlers(dlm);
  	dlm_complete_thread(dlm);
@@ -89,8 +89,8 @@
  	dlm->dlm_state = DLM_CTXT_NEW;
 Index: cert2/fs/ocfs2/dlm/dlmmaster.c
 ===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmmaster.c	2006-04-06 10:57:49.300287000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmmaster.c	2006-04-06 10:57:56.705021000 -0700
+--- cert2.orig/fs/ocfs2/dlm/dlmmaster.c	2006-04-07 13:41:12.826120000 -0700
++++ cert2/fs/ocfs2/dlm/dlmmaster.c	2006-04-07 13:41:18.939200000 -0700
 @@ -2018,7 +2018,7 @@
  	list_add_tail(&item->list, &dlm->work_list);
  	spin_unlock(&dlm->work_lock);
@@ -102,9 +102,9 @@
  
 Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
 ===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c	2006-04-06 10:57:49.245287000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmrecovery.c	2006-04-06 11:00:52.775544000 -0700
-@@ -149,6 +149,62 @@
+--- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c	2006-04-07 13:41:12.758120000 -0700
++++ cert2/fs/ocfs2/dlm/dlmrecovery.c	2006-04-07 13:49:28.604440000 -0700
+@@ -149,6 +149,72 @@
  	spin_unlock(&dlm->spinlock);
  }
  
@@ -143,6 +143,15 @@
 +	}
 +}
 +
++static int dlm_worker_has_work(struct dlm_ctxt *dlm)
++{
++	int ret;
++	spin_lock(&dlm->work_lock);
++	ret = !list_empty(&dlm->work_list);
++	spin_unlock(&dlm->work_lock);
++	return ret;
++}
++
 +static int dlm_worker_thread(void *data)
 +{
 +	struct dlm_ctxt *dlm = data;
@@ -157,7 +166,8 @@
 +		}
 +
 +		wait_event_interruptible(dlm->dlm_worker_thread_wq,
-+					 kthread_should_stop());
++					 kthread_should_stop() ||
++					 dlm_worker_has_work(dlm));
 +	}
 +
 +	mlog(0, "quitting DLM worker thread\n");
@@ -167,7 +177,7 @@
  /* Worker function used during recovery. */
  void dlm_dispatch_work(void *data)
  {
-@@ -157,15 +213,22 @@
+@@ -157,15 +223,22 @@
  	struct list_head *iter, *iter2;
  	struct dlm_work_item *item;
  	dlm_workfunc_t *workfunc;
@@ -190,7 +200,7 @@
  
  		/* already have ref on dlm to avoid having
  		 * it disappear.  just double-check. */
-@@ -173,10 +236,14 @@
+@@ -173,7 +246,10 @@
  
  		/* this is allowed to sleep and
  		 * call network stuff */
@@ -201,11 +211,7 @@
  
  		dlm_put(dlm);
  		kfree(item);
-+		cond_resched();
- 	}
- }
- 
-@@ -874,7 +941,7 @@
+@@ -874,7 +950,7 @@
  	spin_lock(&dlm->work_lock);
  	list_add_tail(&item->list, &dlm->work_list);
  	spin_unlock(&dlm->work_lock);
@@ -214,7 +220,7 @@
  
  	dlm_put(dlm);
  	return 0;
-@@ -1429,7 +1496,7 @@
+@@ -1429,7 +1505,7 @@
  	spin_lock(&dlm->work_lock);
  	list_add_tail(&item->list, &dlm->work_list);
  	spin_unlock(&dlm->work_lock);
@@ -225,8 +231,8 @@
  	dlm_put(dlm);
 Index: cert2/fs/ocfs2/dlm/dlmthread.c
 ===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmthread.c	2006-04-06 10:57:48.595608000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmthread.c	2006-04-06 10:57:49.428287000 -0700
+--- cert2.orig/fs/ocfs2/dlm/dlmthread.c	2006-04-07 13:41:12.134293000 -0700
++++ cert2/fs/ocfs2/dlm/dlmthread.c	2006-04-07 13:41:12.945120000 -0700
 @@ -750,7 +750,7 @@
  
  		/* yield and continue right away if there is more work to do */




More information about the Ocfs2-commits mailing list