[ENBD] 2.6.0 support
Peter T. Breuer
ptb at it.uc3m.es
Thu Jan 15 13:22:57 MST 2004
"Also sprach Carlos Knowlton:"
> Is there an up-to-date patch available for Linux 2.6?
Not till I do it. I'll try and get round to it Real Soon Now (TM).
> I'm having trouble patching-in support for the 2.6.0 kernel. I'm using the
> 2.6.0test2 patch file in the patches folder in the ENBDpackage. When I
> patch, I get the following:
>
> -----------------------------start-----------------------------------------
> ...
> patching file drivers/block/enbd/Kconfig
> patching file drivers/block/enbd/Makefile
> missing header for unified diff at line 95 of patch
Your patch program is being silly. Fix it or edit the patch slightly
in order to suit it better.
(line 95 is the "@@" line)
--- - Sun Apr 20 20:51:13 2003
+++ linux-2.6.0-test2/drivers/block/enbd/enbd_base.c Sun Aug 17 08:09:56 2003
@@ -0,0 +1,4200 @@
+/*
+ * (Enhanced) Network block device - make block devices work over TCP
+ *
Ya seez? Looks open and shut to me! It doesn't like a "-" as one of the
file names. Shrug. So let it choose the other one, or make it be quiet.
If I were desperate for peace, I would substitute the "-" by
"linux-2.6.0-test2.orig/drivers/block/enbd/enbd_base.c".
> ------------------------------start----------------------------------------
> [root at localhost linux-2.6.0]# make
> SPLIT include/linux/autoconf.h -> include/config/*
> make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
> CHK include/linux/compile.h
> CC arch/i386/kernel/timers/timer_tsc.o
> LD arch/i386/kernel/timers/built-in.o
> LD arch/i386/kernel/built-in.o
> IKCFG kernel/ikconfig.h
> GZIP kernel/config_data.gz
> IKCFG kernel/config_data.h
> CC kernel/configs.o
> LD kernel/built-in.o
> LD drivers/block/enbd/built-in.o
> CC [M] drivers/block/enbd/enbd_base.o
> In file included from drivers/block/enbd/enbd_base.c:271:
> include/linux/enbd.h:165: error: syntax error before "int"
And what line is that? As I count, it is the "dec" line below:
+ struct enbd_md;
+ struct enbd_md {
+ int count;
+ int doing_notify;
+ int notify_pid;
+ spinlock_t access_lock;
+ int (*notify_fn)(kdev_t, int);
+ int (*notify)(struct enbd_md *,kdev_t, int cmd);
+ int (*dec)(struct enbd_md *);
+ int (*inc)(struct enbd_md *);
+ int (*reg)(struct enbd_md *, int(*)(kdev_t, int));
+ };
And I see nothing to complain about there! If it were the "notify_fn"
line instead, and "spinlock_t" had mutated to something else in the
kernel code, that would explain it. But you could fix that yourself and
tell me about it!
But maybe it is the "notify" line and kdev_t is what has mutated.
What I'd really like to know is where it gets struct enbd_md from, as
that appears to have been defined in enbd_md.c !! Oh - anyway, it
doesn't matter, as the line at the top of my quote warns the compiler
that it's an opaque struct for the moment and to just be quiet about it.
We only pass pointers to it.
Need more clues!
You wouldn't be trying to use some oddball compiler, perchance?
> include/linux/enbd.h:165: warning: function declaration isn't a prototype
> include/linux/enbd.h:166: error: syntax error before "kdev_t"
> Does anyone have a solution to this?
Sure - you do. Show the lines that the compiler complains about! :-).
Then we can decide whether the code is right or the compiler is right
(or another of the 4 possibilities :-).
Peter
More information about the ENBD
mailing list