2001-12-16 13:38:36

by Stefano Rivoir

[permalink] [raw]
Subject: Compilation of 2.5.1-pre11 fails w/LVM as module


As stated in the subject, this is 'make modules' output:

make[2]: Entering directory `/us2/usr/src/linux/drivers/md'
gcc -D__KERNEL__ -I/us2/usr/src/linux/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing-fno-common -pipe -mpreferred-stack-boundary=2 -march=i686
-malign-functions=4 -DMODULE -c -o lvm.o lvm.clvm.c: In function `lvm_user_bmap':
lvm.c:1046: request for member `bv_len' in something not a structure or union
make[2]: *** [lvm.o] Error 1
make[2]: Leaving directory `/us2/usr/src/linux/drivers/md'
make[1]: *** [_modsubdir_md] Error 2
make[1]: Leaving directory `/us2/usr/src/linux/drivers'
make: *** [_mod_drivers] Error 2

Sorry if already issued by someone else :)

Bye

--
Stefano





2001-12-17 06:06:19

by Thorkild Stray

[permalink] [raw]
Subject: Re: Compilation of 2.5.1-pre11 fails w/LVM as module

<[email protected]> writes:

> As stated in the subject, this is 'make modules' output:
>
> make[2]: Entering directory `/us2/usr/src/linux/drivers/md'
> gcc -D__KERNEL__ -I/us2/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing-fno-common -pipe -mpreferred-stack-boundary=2 -march=i686
> -malign-functions=4 -DMODULE -c -o lvm.o lvm.clvm.c: In function `lvm_user_bmap':
> lvm.c:1046: request for member `bv_len' in something not a structure or union
> make[2]: *** [lvm.o] Error 1
> make[2]: Leaving directory `/us2/usr/src/linux/drivers/md'
> make[1]: *** [_modsubdir_md] Error 2
> make[1]: Leaving directory `/us2/usr/src/linux/drivers'
> make: *** [_mod_drivers] Error 2
> Sorry if already issued by someone else :)

This can be fixed (so that is compiles) by just changing line 1046 from:

bio.bi_io_vec.bv_len = lvm_get_blksize(bio.bi_dev);

to

bio.bi_io_vec->bv_len = lvm_get_blksize(bio.bi_dev);

This is due to changes in the I/O layer. You used to only have one
bio_vec struct in the bio struct, but now it has changed to a linked
list.

Warning: This makes it compile, but it does not necessarily make it
work, but I might. :) Since the rest of LVM hasn't been changed to
use the new linked-list-possibility, it shouldn't make a difference.


--
Thorkild Stray, Linpro AS <[email protected]>