Norbert Preining | 1 Oct 15:10 2002
Picon

kernel 2.2.20 and 2.2.21 and enbd

Hi!

I am new to the list and want to try endb. I had various problems with
out group of 15 diskless clients using nbd/server/client from the debian
packages (nbd.sf.net, packages.debian.org/nbd-server) with different
version of patches for kernel 2.2.21 etc.

Now I want to try endb since it looks more maintained and developed then
the normal nbd stuff.

I tried to compile it with linux-2.2.21 headers but it didn't moarning
on errors in cdrom.h:
gcc -O2 -Wall -D_LARGEFILE64_SOURCE -I/tmp/enbd -I/home/assoc/preining/nbd-2.4.29/linux/include
-I/usr/src/linux/include -DDEBUG=0 -o ioctl.o -c /home/assoc/preining/nbd-2.4.29/nbd/ioctl.c
In file included from /home/assoc/preining/nbd-2.4.29/nbd/ioctl.c:9:
/usr/src/linux/include/linux/cdrom.h:227: parse error before `caddr_t'
/usr/src/linux/include/linux/cdrom.h:227: warning: no semicolon at end of struct or union
/usr/src/linux/include/linux/cdrom.h:229: parse error before `}'
/home/assoc/preining/nbd-2.4.29/nbd/ioctl.c:137: sizeof applied to an incomplete type
/home/assoc/preining/nbd-2.4.29/nbd/ioctl.c:138: sizeof applied to an incomplete type
/home/assoc/preining/nbd-2.4.29/nbd/ioctl.c:145: sizeof applied to an incomplete type
make[1]: *** [ioctl.o] Error 1

Ok, I succeded in compiling it with the linux-2.4.19 headers, but our
server is running on 2.2.21 and the clients on 2.2.20 (or 2.2.21).

So now I have various questions:
* Are there any pitfalls converting from nbd to enbd?
* Is swapping over enbd working without patching the kernel, if not,
  which kernel patches are necessary?
(Continue reading)

Peter T. Breuer | 1 Oct 16:45 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

"A month of sundays ago Norbert Preining wrote:"
> I tried to compile it with linux-2.2.21 headers but it didn't moarning
> on errors in cdrom.h:

I don't think it works with current 2.2 kernels. You will have to go
back a few versions until you find one that still works with a current
2.2 (or an old 2.2).

> gcc -O2 -Wall -D_LARGEFILE64_SOURCE -I/tmp/enbd
-I/home/assoc/preining/nbd-2.4.29/linux/include -I/usr/src/linux/include -DDEBUG=0 -o ioctl.o
-c /home/assoc/preining/nbd-2.4.29/nbd/ioctl.c
> In file included from /home/assoc/preining/nbd-2.4.29/nbd/ioctl.c:9:
> /usr/src/linux/include/linux/cdrom.h:227: parse error before `caddr_t'

Well, that's not an error in my code. Can you show the line - it seems
to be a missing semicolon but it could be something else.

> /usr/src/linux/include/linux/cdrom.h:227: warning: no semicolon at end of struct or union

You maybe need to add one there (after the struct definition).

> Ok, I succeded in compiling it with the linux-2.4.19 headers, but our
> server is running on 2.2.21 and the clients on 2.2.20 (or 2.2.21).
> 
> 
> So now I have various questions:
> * Are there any pitfalls converting from nbd to enbd?
> * Is swapping over enbd working without patching the kernel, if not,
>   which kernel patches are necessary?
> * Is there a way to get enbd compile on 2.2.21?
(Continue reading)

Norbert Preining | 1 Oct 17:03 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

On Die, 01 Okt 2002, Peter T. Breuer wrote:
> Well, that's not an error in my code. Can you show the line - it seems
> to be a missing semicolon but it could be something else.

Strange, tar -xjf linux-2.4.19.tar.bz2 produced this file...
anyway, since (see below)

> > * Are there any pitfalls converting from nbd to enbd?
> > * Is swapping over enbd working without patching the kernel, if not,
> >   which kernel patches are necessary?
> > * Is there a way to get enbd compile on 2.2.21?
> 
> To the latter: well, yes - pay me :-). I think I managed to get it

Hehe ;-) Good joke, who pays me, I am scientific personal doing research
in mathematical logic spending a bit of time to keep the IT
infrastructure more or less working here ... you know the problem
probably!

> compiled for 2.2.20, and it never worked, and I wasn't motivated to
> track down why.

Ok,. so I forget enbd and 2.2.X, no problem for me.

> until you find one that does work with your kernel (if there is one)
> and then let me know! I can take it from there.

What about 2.4.X?
* swap, 2.4.19, ... working with latest revision?

(Continue reading)

Peter T. Breuer | 1 Oct 18:01 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

"A month of sundays ago Norbert Preining wrote:"
[Charset iso-8859-15 unsupported, filtering to ASCII...]
> On Die, 01 Okt 2002, Peter T. Breuer wrote:
> > Well, that's not an error in my code. Can you show the line - it seems
> > to be a missing semicolon but it could be something else.
> 
> Strange, tar -xjf linux-2.4.19.tar.bz2 produced this file...
> anyway, since (see below)

The reference was to a kernel header, afair.

> > compiled for 2.2.20, and it never worked, and I wasn't motivated to
> > track down why.
> 
> Ok,. so I forget enbd and 2.2.X, no problem for me.

Well it used to work a few versions back - it would be useful to tell
me which works! My dismotivation comes from having to find a 2.2 kernel
and boot in it in order to track things down. If youtell me such and
such a version worked and such and such does not, then I can eyeball
the changesets and probably see what the problem is without the hard
work of rebooting (which DOES take time - as long as 15 mins if my
portable decide to drop its speed and do FS rechecks, and then I
have to compile the kernels too, which means finding space for them).

> > until you find one that does work with your kernel (if there is one)
> > and then let me know! I can take it from there.
> 
> What about 2.4.X?
> * swap, 2.4.19, ... working with latest revision?
(Continue reading)

Norbert Preining | 1 Oct 18:57 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

On Die, 01 Okt 2002, Peter T. Breuer wrote:
> Well it used to work a few versions back - it would be useful to tell
> me which works! My dismotivation comes from having to find a 2.2 kernel

Ok, if I find the time and the machine. Remember, 12 (stupid) users
sitting on diskless clients checking it. But it could be done.

Can you give me a hint at which kernel version I could start, or dou you
mean I should try different kernel versions AND different enbd versions?

> > What about 2.4.X?
> > * swap, 2.4.19, ... working with latest revision?
> 
> Yes.

Great. Is patching necessary for 2.4.X kernels? Or just the plain
package. Can the server run on 2.2.X (nbd-server is in user space, or?)
and the client in 2.4?

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at>         Technische Universit├Ąt Wien
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
TROSSACHS (pl.n.) The useless epaulettes on an expensive raincoat.

			--- Douglas Adams, The Meaning of Liff 
(Continue reading)

Peter T. Breuer | 1 Oct 19:00 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

"A month of sundays ago Norbert Preining wrote:"
> On Die, 01 Okt 2002, Peter T. Breuer wrote:
> Can you give me a hint at which kernel version I could start, or dou you
> mean I should try different kernel versions AND different enbd versions?

You should try kernel 2.4.18, and probably enbd 2.4.24 (I can't recall
which worked).

> > > What about 2.4.X?
> > > * swap, 2.4.19, ... working with latest revision?
> > 
> > Yes.
> 
> Great. Is patching necessary for 2.4.X kernels? Or just the plain

No, just remember not to compile kernel nbd into it.

> package. Can the server run on 2.2.X (nbd-server is in user space, or?)
> and the client in 2.4?

Yes, the server is pure userland.

Peter
Peter T. Breuer | 1 Oct 19:02 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

"A month of sundays ago ptb wrote:"
> "A month of sundays ago Norbert Preining wrote:"
> > On Die, 01 Okt 2002, Peter T. Breuer wrote:
> > Can you give me a hint at which kernel version I could start, or dou you
> > mean I should try different kernel versions AND different enbd versions?
> 
> You should try kernel 2.4.18, and probably enbd 2.4.24 (I can't recall

err, I probably mean kernel 2.2.18.

Peter
Peter T. Breuer | 2 Oct 13:23 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

"Norbert Preining wrote:"
> On Die, 01 Okt 2002, Peter T. Breuer wrote:
> > > gcc -O2 -Wall -D_LARGEFILE64_SOURCE -I/tmp/enbd
-I/home/assoc/preining/nbd-2.4.29/linux/include -I/usr/src/linux/include -DDEBUG=0 -o ioctl.o
-c /home/assoc/preining/nbd-2.4.29/nbd/ioctl.c
> > > In file included from /home/assoc/preining/nbd-2.4.29/nbd/ioctl.c:9:
> > > /usr/src/linux/include/linux/cdrom.h:227: parse error before `caddr_t'
> > 
> > Well, that's not an error in my code. Can you show the line - it seems
> > to be a missing semicolon but it could be something else.
> > 
> > > /usr/src/linux/include/linux/cdrom.h:227: warning: no semicolon at end of struct or union
> > 
> > You maybe need to add one there (after the struct definition).
> 
> Strange. I tried with 2.2.18 and had the same problems, here the lines

I thought you were compiling against 2.2.18 .. oh, you mean, as opposed
to against 2.2.20? Yes, I don't suppose later enbd 2.4 compiles against
2.2 kernels, but this particular problem can be fixed.

> from cdrom.h:
> /* This struct is used by the CDROMREADMODE1, and CDROMREADMODE2 ioctls
>  * */
> struct cdrom_read
> {
>         int     cdread_lba;
>         caddr_t cdread_bufaddr;
>         int     cdread_buflen;
> };
(Continue reading)

Norbert Preining | 2 Oct 15:58 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

On Mit, 02 Okt 2002, Peter T. Breuer wrote:
> I thought you were compiling against 2.2.18 .. oh, you mean, as opposed
> to against 2.2.20? Yes, I don't suppose later enbd 2.4 compiles against

Yes, 2.2.20 opposed to 2.2.18

> all that is already in there ... aha! It may be a kernel name problem. Try
> "__caddr_t".

What about -D__KERNEL__ :
[/var/tmp/enbd] gcc -O2 -Wall -D__KERNEL__ -D_LARGEFILE64_SOURCE -I/tmp/enbd
-I/usr/src/dc/nbd-2.4.29/linux/include -I/usr/src/dc/linux-2.2.18/include  -DDEBUG=0 -o
ioctl.o -c
/usr/src/dc/nbd-2.4.29/nbd/ioctl.c
/usr/src/dc/nbd-2.4.29/nbd/ioctl.c: In function `nbd_ioctl_copy_to_user':
/usr/src/dc/nbd-2.4.29/nbd/ioctl.c:307: warning: implicit declaration of function `copy_to_user'
/usr/src/dc/nbd-2.4.29/nbd/ioctl.c: In function `nbd_ioctl_copy_from_user':
/usr/src/dc/nbd-2.4.29/nbd/ioctl.c:329: warning: implicit declaration of function `copy_from_user'

This seems to solve the first problem but at then end ...:
ioctl.o: In function `nbd_ioctl_copy_to_user':
ioctl.o(.text+0x1f7): undefined reference to `copy_to_user'
ioctl.o: In function `nbd_ioctl_copy_from_user':
ioctl.o(.text+0x25b): undefined reference to `copy_from_user'
collect2: ld returned 1 exit status

Well, at least one step further.

Best wishes

(Continue reading)

Peter T. Breuer | 2 Oct 16:11 2002
Picon

Re: kernel 2.2.20 and 2.2.21 and enbd

"A month of sundays ago Norbert Preining wrote:"
> On Mit, 02 Okt 2002, Peter T. Breuer wrote:
> > I thought you were compiling against 2.2.18 .. oh, you mean, as opposed
> > to against 2.2.20? Yes, I don't suppose later enbd 2.4 compiles against
> 
> Yes, 2.2.20 opposed to 2.2.18
> 
> > all that is already in there ... aha! It may be a kernel name problem. Try
> > "__caddr_t".
> 
> What about -D__KERNEL__ :

Well, I don't like to do that in user space. I think the problem may
simply be that the remote ioctl code was never ever developed against 2.2
kernels. But if you can make it compile it should never be needed. I
can make the ioctl code go away if I try .. or just step back a couple
of enbd versions! I think the code only appeared very recently in enbd.
Maybe 2.4.27 or 2.4.28 is without it.

> [/var/tmp/enbd] gcc -O2 -Wall -D__KERNEL__ -D_LARGEFILE64_SOURCE -I/tmp/enbd
-I/usr/src/dc/nbd-2.4.29/linux/include -I/usr/src/dc/linux-2.2.18/include  -DDEBUG=0 -o
ioctl.o -c
> /usr/src/dc/nbd-2.4.29/nbd/ioctl.c
> /usr/src/dc/nbd-2.4.29/nbd/ioctl.c: In function `nbd_ioctl_copy_to_user':
> /usr/src/dc/nbd-2.4.29/nbd/ioctl.c:307: warning: implicit declaration of function `copy_to_user'

Well, that's very fundamental! What do the 2.2 kernels use for that?
It appears to be "copy_to_user"! Look in asm/uacess.h. Those functions
are defined! Isn't asm/uacess.h #included?

(Continue reading)


Gmane