Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] drbd 0.7 with recent kernels?
@ 2006-08-14 13:15 Lars Marowsky-Bree
  2006-08-14 16:35 ` Lars Ellenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Marowsky-Bree @ 2006-08-14 13:15 UTC (permalink / raw)
  To: drbd-dev

Hi,

did anyone already rip out the devfs support from drbd 0.7 to make it
compile with the latest kernels from upstream again, so I can avoid
doing it myself? ;-)


Sincerely,
    Lars

-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Drbd-dev] drbd 0.7 with recent kernels?
  2006-08-14 13:15 [Drbd-dev] drbd 0.7 with recent kernels? Lars Marowsky-Bree
@ 2006-08-14 16:35 ` Lars Ellenberg
  2006-08-14 19:47   ` Lars Marowsky-Bree
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ellenberg @ 2006-08-14 16:35 UTC (permalink / raw)
  To: drbd-dev

/ 2006-08-14 15:15:54 +0200
\ Lars Marowsky-Bree:
> Hi,
> 
> did anyone already rip out the devfs support from drbd 0.7 to make it
> compile with the latest kernels from upstream again, so I can avoid
> doing it myself? ;-)

"latest kernels" ...
well, we still compile against 2.6.17 as is.

I'm happy to rip it out in trunk completely.

but since we support even 2.4 kernels in drbd 0.7,
there you probably have to do it yourself, in case it is neccessary.
maybe you could just ifdef some empty defines in drbd_compat*.h ?

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Drbd-dev] drbd 0.7 with recent kernels?
  2006-08-14 16:35 ` Lars Ellenberg
@ 2006-08-14 19:47   ` Lars Marowsky-Bree
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Marowsky-Bree @ 2006-08-14 19:47 UTC (permalink / raw)
  To: drbd-dev

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

On 2006-08-14T18:35:36, Lars Ellenberg <Lars.Ellenberg@linbit.com> wrote:

> / 2006-08-14 15:15:54 +0200
> \ Lars Marowsky-Bree:
> > Hi,
> > 
> > did anyone already rip out the devfs support from drbd 0.7 to make it
> > compile with the latest kernels from upstream again, so I can avoid
> > doing it myself? ;-)
> 
> "latest kernels" ...
> well, we still compile against 2.6.17 as is.

I was referring to the upcoming 2.6.18.

I've attached the patch needed to compile it with that. Simple enough
indeed ;-)


Sincerely,
    Lars Marowsky-Brée

-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"


[-- Attachment #2: drbd-2.6.18.diff --]
[-- Type: text/x-patch, Size: 2100 bytes --]

Index: drbd/drbd_main.c
===================================================================
--- drbd/drbd_main.c	(revision 2372)
+++ drbd/drbd_main.c	(working copy)
@@ -49,7 +49,9 @@
 #include <linux/mm_inline.h>
 #endif
 #include <linux/slab.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 #include <linux/devfs_fs_kernel.h>
+#endif
 
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
@@ -144,10 +146,11 @@
 #endif
 int disable_bd_claim = 0;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 // devfs name
 char* drbd_devfs_name = "drbd";
+#endif
 
-
 // global panic flag
 volatile int drbd_did_panic = 0;
 
@@ -1695,8 +1698,10 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	devfs_unregister(devfs_handle);
 #else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 	devfs_remove(drbd_devfs_name);
 #endif
+#endif
 
 	if (unregister_blkdev(MAJOR_NR, DEVICE_NAME) != 0)
 		printk(KERN_ERR DEVICE_NAME": unregister of device failed\n");
@@ -1769,7 +1774,9 @@
 		return err;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 	drbd_devfs_name = (major_nr == NBD_MAJOR) ? "nbd" : "drbd";
+#endif
 
 	/*
 	 * allocate all necessary structs
@@ -1791,7 +1798,9 @@
 	if (unlikely(!drbd_blocksizes)) goto Enomem;
 #else
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 	devfs_mk_dir(drbd_devfs_name);
+#endif
 
 	for (i = 0; i < minor_count; i++) {
 		drbd_dev    *mdev = drbd_conf + i;
@@ -1814,7 +1823,9 @@
 		disk->first_minor = i;
 		disk->fops = &drbd_ops;
 		sprintf(disk->disk_name, DEVICE_NAME "%d", i);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 		sprintf(disk->devfs_name, "%s/%d", drbd_devfs_name, i);
+#endif
 		disk->private_data = mdev;
 		add_disk(disk);
 
Index: drbd/drbd_int.h
===================================================================
--- drbd/drbd_int.h	(revision 2372)
+++ drbd/drbd_int.h	(working copy)
@@ -73,8 +73,10 @@
 extern int major_nr;
 extern int use_nbd_major;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 // use_nbd_major ? "nbd" : "drbd";
 extern char* drbd_devfs_name;
+#endif
 
 #include <linux/major.h>
 #ifdef DRBD_MAJOR

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-14 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-14 13:15 [Drbd-dev] drbd 0.7 with recent kernels? Lars Marowsky-Bree
2006-08-14 16:35 ` Lars Ellenberg
2006-08-14 19:47   ` Lars Marowsky-Bree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox