[ENBD] Compiling enbd under SuSE 8.2

Simon Oliver enbd@lists.community.tummy.com
Mon, 14 Jul 2003 08:16:53 +0100


I want to try enbd on my SuSE 8.2 system (runs 2.4.20 kernel).

I downloaded the stable release of enbd (nbd-2.4.30) but found that it 
wouldn't build the enbd.o kernel module - looking at the package 
contents it looks like only 2.4.19 is supported.

Next I downloaded nbd-2.4.31, patched my kernel source with 
"kernel/patches/enbd-2.4.20.pat", configured the kernel to build enbd as 
a module but now I get the following error when I try to build the module:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.20.SuSE/include -Wall 
-Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-sign-compare 
-finline-
imit=2000 -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 
-march=pentiu
4 -DMODULE  -nostdinc -iwithprefix include -DKBUILD_BASENAME=enbd  -c -o 
enbd.o
enbd.c
enbd.c: In function `set_ac':
enbd.c:789: warning: function declaration isn't a prototype
enbd.c:794: warning: function declaration isn't a prototype
enbd.c: In function `nbd_open':
enbd.c:1297: error: structure has no member named `f_iobuf'
enbd.c: At top level:
enbd.c:3377: warning: function declaration isn't a prototype
enbd.c: In function `nbd_release':
enbd.c:6599: error: structure has no member named `f_iobuf'
enbd.c:6603: error: structure has no member named `f_iobuf'
enbd.c: In function `add_blockmap':
enbd.c:6702: warning: function declaration isn't a prototype
enbd.c: In function `del_blockmap':
enbd.c:6731: warning: function declaration isn't a prototype
enbd.c: In function `nbd_set_enabled':
enbd.c:6806: warning: function declaration isn't a prototype
enbd.c: In function `nbd_zero_counters':
enbd.c:6838: warning: function declaration isn't a prototype
enbd.c: In function `nbd_proc_hotadd':
enbd.c:6868: warning: function declaration isn't a prototype
enbd.c: In function `nbd_proc_hotremove':
enbd.c:6901: warning: function declaration isn't a prototype
enbd.c: In function `nbd_proc_setfaulty':
enbd.c:6933: warning: function declaration isn't a prototype
enbd.c: In function `getarg':
enbd.c:7914: warning: function declaration isn't a prototype
enbd.c: In function `nbd_setup':
enbd.c:8359: warning: integer constant is too large for "long" type
make[2]: *** [enbd.o] Error 1


When configuring the kernel build options I notice there are two 
optional components:

ENBD remote ioctl support                                             x 
ENBD remote-read/local-write support

I have tried building with and without these to no avail (should I be 
selecting these extra options or not?).  I can't find any documentation 
on how to patch the kernel and build the module so I could be doing this 
all wrong.

Please help.

-- 
   Simon Oliver