[Ocfs2-devel] [PATCH]2.6 fixes in hash.c

Rusty Lynch rusty at linux.co.intel.com
Tue Feb 24 08:29:30 CST 2004


I still have a few items missing to enable a clean compile against
a 2.6 kernel.  The following is a patch to hash.c that:

* kicks off the block-io run queues in the new non-task_queue 
  oriented way
* utilizes the new io_schedule() method

Index: src/hash.c
===================================================================
--- src/hash.c	(revision 34)
+++ src/hash.c	(working copy)
@@ -1104,10 +1104,18 @@
 		if (!buffer_modified(bh) ||
 		    sem->s_pid == current->pid)
 			break;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+		blk_run_queues();
+#else
 		run_task_queue(&tq_disk);
+#endif
 		if (!do_timeout) {
 			set_task_state(tsk, TASK_UNINTERRUPTIBLE);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+			io_schedule();
+#else
 			schedule();
+#endif
 		} else {
 			do_timeout = 0;
 			set_task_state(tsk, TASK_INTERRUPTIBLE);


More information about the Ocfs2-devel mailing list