[Ocfs2-commits] mfasheh commits r819 - trunk/src

Rusty Lynch rusty at linux.co.intel.com
Mon Mar 29 15:57:32 CST 2004


On Mon, Mar 29, 2004 at 04:48:46PM -0600, svn-commits at oss.oracle.com wrote:
> Author: mfasheh
> Date: 2004-03-29 16:48:45 -0600 (Mon, 29 Mar 2004)
> New Revision: 819
> 
> Modified:
>    trunk/src/journal.c
> Log:
> * handle signals in the commit thread properly. This helps umount
>   during reboot, and helps close a hole where a user could ruin ocfs
>   performance by sending a signal to the commit thread. Done with help
>   from Sonic Zhang <sonic.zhang at intel.com>
> 

This svn version breaks 2.4 kernels with NPTL
> +					spin_lock_irq(&current->sigmask_lock);
> +					/* ignore the actual signal */
> +					dequeue_signal(&current->blocked, 
> +						       &info);
> +					spin_unlock_irq(&current->sigmask_lock);


Here is a patch to fix this...


Index: src/journal.c
===================================================================
--- src/journal.c	(revision 820)
+++ src/journal.c	(working copy)
@@ -1777,12 +1777,20 @@
 							    &current->blocked, 
 							    &info);
 #else
+#ifdef HAVE_NPTL
+					spin_lock_irq (&current->sighand->siglock);
+					/* ignore the actual signal */
+					dequeue_signal(&current->blocked, 
+						       &info);
+					spin_unlock_irq(&current->sighand->siglock);					
+#else 
 					spin_lock_irq(&current->sigmask_lock);
 					/* ignore the actual signal */
 					dequeue_signal(&current->blocked, 
 						       &info);
 					spin_unlock_irq(&current->sigmask_lock);
-#endif
+#endif /* !HAVE_NPTL */
+#endif /* 2.4.x kernel */
 				}
 				LOG_TRACE_STR("FLUSH_EVENT: interrupted");
 				break;


More information about the Ocfs2-commits mailing list