Author: mguevara                     Date: Thu Dec 21 00:27:15 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- based on http://members.home.nl/maarten/drbd-0.7.22-2.6.19.patch but compliant
  with older kernels

---- Files affected:
SOURCES:
   drbd-0.7.22-2.6.19-friendly.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/drbd-0.7.22-2.6.19-friendly.patch
diff -u /dev/null SOURCES/drbd-0.7.22-2.6.19-friendly.patch:1.1
--- /dev/null   Thu Dec 21 01:27:15 2006
+++ SOURCES/drbd-0.7.22-2.6.19-friendly.patch   Thu Dec 21 01:27:10 2006
@@ -0,0 +1,133 @@
+diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_fs.c 
drbd-0.7.22.new/drbd/drbd_fs.c
+--- drbd-0.7.22.orig/drbd/drbd_fs.c    2006-12-21 01:16:11.000000000 +0100
++++ drbd-0.7.22.new/drbd/drbd_fs.c     2006-12-21 01:35:59.000000000 +0100
+@@ -28,7 +28,12 @@
+ 
+  */
+ 
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ #include <linux/config.h>
++#endif
++
+ #include <linux/module.h>
+ 
+ #include <asm/uaccess.h>
+diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_main.c 
drbd-0.7.22.new/drbd/drbd_main.c
+--- drbd-0.7.22.orig/drbd/drbd_main.c  2006-12-21 01:16:11.000000000 +0100
++++ drbd-0.7.22.new/drbd/drbd_main.c   2006-12-21 01:37:02.000000000 +0100
+@@ -31,9 +31,13 @@
+ 
+  */
+ 
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ #include <linux/config.h>
++#endif
++
+ #include <linux/module.h>
+-#include <linux/version.h>
+ 
+ #include <asm/uaccess.h>
+ #include <asm/types.h>
+@@ -1627,12 +1631,24 @@ void drbd_destroy_mempools(void)
+ {
+       if (drbd_request_mempool)
+               mempool_destroy(drbd_request_mempool);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+       if (drbd_ee_cache && kmem_cache_destroy(drbd_ee_cache))
++#endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++
++      kmem_cache_destroy(drbd_ee_cache);
++      kmem_cache_destroy(drbd_request_cache);
++
++      /*if (drbd_ee_cache && kmem_cache_destroy(drbd_ee_cache))
++#endif
+               printk(KERN_ERR DEVICE_NAME
+                      ": kmem_cache_destroy(drbd_ee_cache) FAILED\n");
+       if (drbd_request_cache && kmem_cache_destroy(drbd_request_cache))
+               printk(KERN_ERR DEVICE_NAME
+                      ": kmem_cache_destroy(drbd_request_cache) FAILED\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++      */
++#endif
+       // FIXME what can we do if we fail to destroy them?
+ 
+       drbd_request_mempool = NULL;
+diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_proc.c 
drbd-0.7.22.new/drbd/drbd_proc.c
+--- drbd-0.7.22.orig/drbd/drbd_proc.c  2006-12-21 01:16:11.000000000 +0100
++++ drbd-0.7.22.new/drbd/drbd_proc.c   2006-12-21 01:37:23.000000000 +0100
+@@ -25,7 +25,12 @@
+ 
+  */
+ 
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ #include <linux/config.h>
++#endif
++
+ #include <linux/module.h>
+ 
+ #include <asm/uaccess.h>
+diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_receiver.c 
drbd-0.7.22.new/drbd/drbd_receiver.c
+--- drbd-0.7.22.orig/drbd/drbd_receiver.c      2006-12-21 01:16:11.000000000 
+0100
++++ drbd-0.7.22.new/drbd/drbd_receiver.c       2006-12-21 01:37:54.000000000 
+0100
+@@ -24,8 +24,12 @@
+    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+ 
++#include <linux/version.h>
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ #include <linux/config.h>
++#endif
++
+ #include <linux/module.h>
+ 
+ #include <asm/uaccess.h>
+@@ -33,7 +37,6 @@
+ 
+ #include <linux/tcp.h>
+ 
+-#include <linux/version.h>
+ #include <linux/fs.h>
+ #include <linux/file.h>
+ #include <linux/in.h>
+diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_req.c 
drbd-0.7.22.new/drbd/drbd_req.c
+--- drbd-0.7.22.orig/drbd/drbd_req.c   2006-12-21 01:16:11.000000000 +0100
++++ drbd-0.7.22.new/drbd/drbd_req.c    2006-12-21 01:38:18.000000000 +0100
+@@ -25,7 +25,12 @@
+ 
+  */
+ 
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ #include <linux/config.h>
++#endif
++
+ #include <linux/module.h>
+ 
+ #include <linux/slab.h>
+diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_worker.c 
drbd-0.7.22.new/drbd/drbd_worker.c
+--- drbd-0.7.22.orig/drbd/drbd_worker.c        2006-12-21 01:16:11.000000000 
+0100
++++ drbd-0.7.22.new/drbd/drbd_worker.c 2006-12-21 01:38:48.000000000 +0100
+@@ -25,9 +25,13 @@
+ 
+  */
+ 
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ #include <linux/config.h>
++#endif
++
+ #include <linux/module.h>
+-#include <linux/version.h>
+ 
+ #include <linux/sched.h>
+ #include <linux/smp_lock.h>
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to