[ENBD] Compiling issues with enbd-2.4.35a and kernel
2.6.25.9
Peter T. Breuer
ptb at inv.it.uc3m.es
Mon Jul 21 06:10:24 MDT 2008
"Also sprach uwe schmeling:"
> Hi list,
Hi!
> when trying to compile enbd I get:
I don't have kernel 2.6.25 (the latest I compile and test under is
2.6.24.2, and if I want stability I would go for 2.6.22). It's likely
that the kernel has changed to make something need something new.
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c: In function local_enbd_end_request:
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:648: error: implicit declaration of function end_that_request_first
Heh! If end_that_request_first has disappeared from the kernel, then big
things have happened. That has been there from linux 1.1.59 at least, as
I recall.
betty:/usr/local/src% grep end_that_request_first linux-*/block/ll_rw_blk.c | grep EXPORT
linux-2.6.15.3/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.16.19/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.16.40/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.16.7/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.17.14/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.17/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.18.8/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.19.7/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.20.7/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.21.7/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.22.10/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.23.1/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.24.2/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-source-2.6.17/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
betty:/usr/local/src% grep end_that_request_first
linux-*/drivers/block/ll_rw_blk.c | grep EXPORT
linux-2.4.17rc2-xfs/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.4.19-xfs/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.4.20-xfs/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.4.8-xfs/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.10/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.12.6/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.12.6_arm1-(iodata_with_ptb_softlock)/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.12.6_arm1-(iodata_with_softlock)/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.13.5/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.14.7/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.3/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
linux-2.6.9/drivers/block/ll_rw_blk.c:EXPORT_SYMBOL(end_that_request_first);
So, uh, in the words of the immortal bard, "what's up doc"?
Can you please check for me where it has gone? Or if it has gone.
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:659: error: implicit declaration of function end_that_request_last
Ditto. If we establish that it has gone, the next thing to do is to
figure what to do about it.
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c: In function enbd_find_kobj:
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:3426: error: struct gendisk has no member named kobj
That's just going to be a straight hunt for where the kernel object has
gone now.
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c: In function ?enbd_init?:
> /tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:7133: error: ?struct
> gendisk? has no member named ?kobj?
It used to. So one needs to figure out when it changed, and how other
drivers reacted to that change.
Sigh. I'd appreciate what help you can give me. Moving to 2.6.25 will be
a learning experience that I might otherwise hope to avoid.
> Furthermore I have running an old server under enbd-2.4.30 which I
> would like to connect to enbd-3.4.35a.
You can't, unfortunately. The on-the-wire sizes and shapes of the
headers preceding data has likely changed between 2.4.30 and 2.4.35.
The enbd_request and enbd_reply structs are defined in include/enbd.h.
In 2.4.35a request is:
struct enbd_request {
__u32 magic;
__u32 type;
__u32 handle;
__u64 from;
__u32 len;
__u32 flags;
__u64 time;
__s64 zone;
__u32 seqno;
union {
__u32 digest[4];
struct { __u64 cmd; __u64 arg; } __attribute__ ((packed)) ioctl;
} data;
char dummy0[0]; /* end of data */
char dummy1[0] __attribute__ ((aligned (64)));
/* end of struct (padded) - 64B */
} __attribute__ ((packed)) ;
and in 2.4.30 it is:
struct nbd_request {
__u32 magic;
__u32 type; /* == READ || == WRITE */
__u32 handle;
__u64 from; /* 64 bit PTB 132 */
__u32 len; /* 32 bit or ioctl code */
__u32 flags;
__u64 time;
__u64 zone;
__u32 seqno;
union { __u32 digest[4]; } data;
__u32 special;
char dummy0[0];
char dummy1[0] __attribute__ ((aligned (64)));
} __attribute__ ((packed)) ;
and those are slightly different lengths. 2.4.30 has a "special" field
that 2.4.35a lacks (it probably got fitted in to the data field over time).
So no, they are not going to play.
> Or is it possible to upgrade to
> 2.4.35a on that server, which is running kernel 2.6.12.3
The kernel is irrelevant for a server. So yes, you should be able to do that.
I'll take a look at the 2.6.25 kernel as I get time, but you can help me
by sending me your kernel's ll_rw_blk.c file, or by looking up some
drivers that used to use the end-request functions in 2.6.24 and showing
me how they look now.
A random grep shows:
./drivers/block/DAC960.c: if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) {
./drivers/block/floppy.c: if (end_that_request_first(req, uptodate, nr_sectors))
./drivers/block/nbd.c: if (!end_that_request_first(req, uptodate, req->nr_sectors)) {
etc. So send me your nbd.c file from the new kernel.
Best regards
Peter
More information about the ENBD
mailing list