make KDIR=... kernel-patch fails
Hello,
I try to patch drbd into the kernel. IIRC this is not longer possible since late 0.7.x released (>=.22 ??).
Currently even on 8.0.0 and 8.0.1 the helper scrips fails on a 2.6.20.1:
----
buildbox-etch:/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1# make
KDIR=/usr/src/linux-vserver/linux-2.6.20.1 kernel-patch
make -C drbd drbd_buildtag.c
make[1]: Entering directory
`/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1/drbd'
make[1]: Leaving directory
`/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1/drbd'
set -o errexit; \
kbase=$(basename /usr/src/linux-vserver/linux-2.6.20.1); \
d=patch-$kbase-drbd-8.0.1; \
test -e $d && cp -fav --backup=numbered $d $d; \
bash scripts/patch-kernel /usr/src/linux-vserver/linux-2.6.20.1
. > $d
rm: cannot remove `linux-2.6.20.1-drbd/drivers/block/drbd/mempool*': No
such file or directory
make: *** [kernel-patch] Error 1
-----I can supress the error by patching two lines in the scripts/patch-kernel script:
-------
patch-kernel 2007-02-25 16:26:02.000000000 +0100 renamed from patch-kernel.sav 2007-02-25 16:25:42.000000000 +0100 +2 -1
@@ -100,9 +100,10 @@ cp -a $DRBD/drbd/Makefile-2.$KDIR_PATCHLEVEL $DRBD_SUB/Makefile # remove some backports -test "$KDIR_PATCHLEVEL" = 6 && rm $DRBD_SUB/mempool* +# remove some backports +test "$KDIR_PATCHLEVEL" = 6 && if [ -e $DRBD_SUB/mempool* ]; then rm
$DRBD_SUB/mempool*; fi
grep "HLIST_HEAD_INIT" $KERNEL/include/linux/list.h >/dev/null &&
- rm $DRBD_SUB/hlist.h
+ if [ -e $DRBD_SUB/hlist.h ]; then rm $DRBD_SUB/hlist.h; fi
# disable __arch_um__ to_virt() hack sed -e 's/^#ifdef __arch_um__/#if 0/' \ ---------
The generated patch applies fine, but when compiling the kernel with drdb as module, the compile runs fails. I assume some part of the patch is missing.
Kernel Hacking is out-of-scope of my skills, so I simply report here what I found out.
rgds,
Andreas
Lars Ellenberg
maintainer/ 2007-03-09 23:16:23 +0100
\ Andreas John:
Quoted 48 lines
Hello,
I try to patch drbd into the kernel. IIRC this is not longer possible since late 0.7.x released (>=.22 ??).Currently even on 8.0.0 and 8.0.1 the helper scrips fails on a 2.6.20.1:
----
buildbox-etch:/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1# make KDIR=/usr/src/linux-vserver/linux-2.6.20.1 kernel-patch make -C drbd drbd_buildtag.c make[1]: Entering directory `/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1/drbd' make[1]: Leaving directory `/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1/drbd' set -o errexit; \ kbase=$(basename /usr/src/linux-vserver/linux-2.6.20.1); \ d=patch-$kbase-drbd-8.0.1; \ test -e $d && cp -fav --backup=numbered $d $d; \ bash scripts/patch-kernel /usr/src/linux-vserver/linux-2.6.20.1 . > $d rm: cannot remove `linux-2.6.20.1-drbd/drivers/block/drbd/mempool*': No such file or directory make: *** [kernel-patch] Error 1 -----I can supress the error by patching two lines in the
scripts/patch-kernelscript:-------
patch-kernel 2007-02-25 16:26:02.000000000 +0100 renamed from patch-kernel.sav 2007-02-25 16:25:42.000000000 +0100 +2
-1@@ -100,9 +100,10 @@ cp -a $DRBD/drbd/Makefile-2.$KDIR_PATCHLEVEL $DRBD_SUB/Makefile # remove some backports -test "$KDIR_PATCHLEVEL" = 6 && rm $DRBD_SUB/mempool* +# remove some backports +test "$KDIR_PATCHLEVEL" = 6 && if [ -e $DRBD_SUB/mempool* ]; then rm$DRBD_SUB/mempool*; fi
grep "HLIST_HEAD_INIT"$KERNEL/include/linux/list.h>/dev/null &&patch-kernel 2007-02-25 16:26:02.000000000 +0100 renamed from patch-kernel.sav 2007-02-25 16:25:42.000000000 +0100 +1
-2- rm $DRBD_SUB/hlist.h + if [ -e $DRBD_SUB/hlist.h ]; then rm $DRBD_SUB/hlist.h; fi # disable __arch_um__ to_virt() hack sed -e 's/^#ifdef __arch_um__/#if 0/' \ ---------
Quoted 1 line
The generated patch applies fine,
I even removed those lines altogether. we no longer have these files,
they have been kernel 2.4 compatibility.
Quoted 6 lines
but when compiling the kernel with
drdb as module, the compile runs fails. I assume some part of the patch is missing.Kernel Hacking is out-of-scope of my skills, so I simply report here what I found out.
thanks for the report.
sorry, but I "officially don't care" right now. though, we will do some effort later this year to try and get drbd into the kernel.org kernel. so when I have time, I'll have a look.
Signature · 3 lines
: Lars Ellenberg Tel +43-1-8178292-55 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com :
Lars Ellenberg
maintainer/ 2007-03-10 12:42:46 +0100
\ Lars Ellenberg:
Quoted 6 lines
/ 2007-03-09 23:16:23 +0100
\ Andreas John:Quoted 2 lines
buildbox-etch:/usr/src/linux-vserver/linux-2.6.20.1/drbd-8.0.1# make KDIR=/usr/src/linux-vserver/linux-2.6.20.1 kernel-patch
Quoted 7 lines
Quoted 1 line
scripts/patch-kernelthanks for the report.
sorry, but I "officially don't care" right now. though, we will do some effort later this year to try and get drbd into the kernel.org kernel. so when I have time, I'll have a look.
please try again with current svn.
Signature · 3 lines
: Lars Ellenberg Tel +43-1-8178292-55 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com :
(Resent, the ML doesnt like /me :/ )
Hello Lars,
still there is one "file missing" ?
See below for the beginning of my build log.
rgds,
Andreas
CC [M] drivers/block/drbd/drbd_strings.o CC [M] drivers/block/drbd/drbd_nl.o CC [M] fs/hfs/dir.o
drivers/block/drbd/drbd_nl.c:38:22: error: drbd_int.h: No such file or directory
In file included from drivers/block/drbd/drbd_nl.c:85:include/linux/drbd_nl.h:14: error: expected â)â before â*â token include/linux/drbd_nl.h:18: error: expected â)â before â*â token include/linux/drbd_nl.h:20: error: expected â)â before â*â token include/linux/drbd_nl.h:30: error: expected â)â before â*â token include/linux/drbd_nl.h:32: error: expected â)â before â*â token include/linux/drbd_nl.h:56: error: expected â)â before â*â token include/linux/drbd_nl.h:58: error: expected â)â before â*â token include/linux/drbd_nl.h:62: error: expected â)â before â*â token include/linux/drbd_nl.h:68: error: expected â)â before â*â token include/linux/drbd_nl.h:69: error: expected â)â before â*â token include/linux/drbd_nl.h:70: error: expected â)â before â*â token include/linux/drbd_nl.h:71: error: expected â)â before â*â token include/linux/drbd_nl.h:72: error: expected â)â before â*â token include/linux/drbd_nl.h:73: error: expected â)â before â*â token include/linux/drbd_nl.h:74: error: expected â)â before â*â token include/linux/drbd_nl.h:75: error: expected â)â before â*â token include/linux/drbd_nl.h:76: error: expected â)â before â*â token include/linux/drbd_nl.h:80: error: expected â)â before â*â token include/linux/drbd_nl.h:85: error: expected â)â before â*â token include/linux/drbd_nl.h:89: error: expected â)â before â*â token In file included from drivers/block/drbd/drbd_nl.c:116:include/linux/drbd_nl.h:14: error: expected â)â before â*â token include/linux/drbd_nl.h:18: error: expected â)â before â*â token include/linux/drbd_nl.h:20: error: expected â)â before â*â token include/linux/drbd_nl.h:30: error: expected â)â before â*â token include/linux/drbd_nl.h:32: error: expected â)â before â*â token include/linux/drbd_nl.h:56: error: expected â)â before â*â token include/linux/drbd_nl.h:58: error: expected â)â before â*â token include/linux/drbd_nl.h:62: error: expected â)â before â*â token include/linux/drbd_nl.h:68: error: expected â)â before â*â token include/linux/drbd_nl.h:69: error: expected â)â before â*â token include/linux/drbd_nl.h:70: error: expected â)â before â*â token include/linux/drbd_nl.h:71: error: expected â)â before â*â token include/linux/drbd_nl.h:72: error: expected â)â before â*â token include/linux/drbd_nl.h:73: error: expected â)â before â*â token include/linux/drbd_nl.h:74: error: expected â)â before â*â token include/linux/drbd_nl.h:75: error: expected â)â before â*â token include/linux/drbd_nl.h:76: error: expected â)â before â*â token include/linux/drbd_nl.h:80: error: expected â)â before â*â token include/linux/drbd_nl.h:85: error: expected â)â before â*â token include/linux/drbd_nl.h:89: error: expected â)â before â*â token drivers/block/drbd/drbd_nl.c:118: error: expected â)â before â*â token drivers/block/drbd/drbd_nl.c:119: error: expected â)â before â*â token drivers/block/drbd/drbd_nl.c: In function ânl_trace_packetâ:drivers/block/drbd/drbd_nl.c:143: error: expected â)â before âDEVICE_NAMEâ drivers/block/drbd/drbd_nl.c:141: warning: unused variable ânlpâ drivers/block/drbd/drbd_nl.c: In function ânl_trace_replyâ:drivers/block/drbd/drbd_nl.c:155: error: expected â)â before âDEVICE_NAMEâ drivers/block/drbd/drbd_nl.c:153: warning: unused variable ânlpâ drivers/block/drbd/drbd_nl.c: At top level:drivers/block/drbd/drbd_nl.c:164: error: expected â)â before â*â token drivers/block/drbd/drbd_nl.c:179: error: expected â)â before â*â token drivers/block/drbd/drbd_nl.c:234: error: expected â)â before â*â token drivers/block/drbd/drbd_nl.c:358: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âintâ drivers/block/drbd/drbd_nl.c:374: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âintâ drivers/block/drbd/drbd_nl.c:384: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âvoidâ drivers/block/drbd/drbd_nl.c:442: warning: âstruct Drbd_Confâ declared inside parameter listdrivers/block/drbd/drbd_nl.c:442: warning: its scope is only this definition or declaration, which is probably not what you want drivers/block/drbd/drbd_nl.c: In function âdrbd_determin_dev_sizeâ:drivers/block/drbd/drbd_nl.c:452: warning: implicit declaration of function âlc_try_lockâdrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:454: warning: implicit declaration of function âdrbd_md_first_sectorâ drivers/block/drbd/drbd_nl.c:454: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:455: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:456: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:459: warning: implicit declaration of function âdrbd_md_set_sector_offsetsâ drivers/block/drbd/drbd_nl.c:459: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:461: warning: implicit declaration of function âdrbd_new_dev_sizeâdrivers/block/drbd/drbd_nl.c:461: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:463: warning: implicit declaration of function âdrbd_get_capacityâdrivers/block/drbd/drbd_nl.c:463: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:464: warning: implicit declaration of function âdrbd_bm_capacityâdrivers/block/drbd/drbd_nl.c:466: warning: implicit declaration of function âdrbd_bm_resizeâdrivers/block/drbd/drbd_nl.c:471: warning: implicit declaration of
Hello All,
Hello Lars,
I don't want to bug you, but is there are chance that the problem gets fixed?
Rgds,
Andreas
Quoted 122 lines · Andreas John
(Resent, the ML doesnt like /me :/ )
Hello Lars,
still there is one "file missing" ?
See below for the beginning of my build log.
rgds,
AndreasCC [M] drivers/block/drbd/drbd_strings.o CC [M] drivers/block/drbd/drbd_nl.o CC [M] fs/hfs/dir.o
drivers/block/drbd/drbd_nl.c:38:22: error:drbd_int.h: No such file or directory
In file included fromdrivers/block/drbd/drbd_nl.c:85:include/linux/drbd_nl.h:14: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:18: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:20: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:30: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:32: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:56: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:58: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:62: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:68: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:69: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:70: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:71: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:72: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:73: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:74: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:75: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:76: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:80: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:85: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:89: error: expected â)â before â*â token In file included fromdrivers/block/drbd/drbd_nl.c:116:include/linux/drbd_nl.h:14: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:18: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:20: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:30: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:32: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:56: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:58: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:62: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:68: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:69: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:70: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:71: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:72: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:73: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:74: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:75: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:76: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:80: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:85: error: expected â)â before â*â tokeninclude/linux/drbd_nl.h:89: error: expected â)â before â*â tokendrivers/block/drbd/drbd_nl.c:118: error: expected â)â before â*â tokendrivers/block/drbd/drbd_nl.c:119: error: expected â)â before â*â tokendrivers/block/drbd/drbd_nl.c: In function ânl_trace_packetâ:drivers/block/drbd/drbd_nl.c:143: error: expected â)â before âDEVICE_NAMEâdrivers/block/drbd/drbd_nl.c:141: warning: unused variable ânlpâdrivers/block/drbd/drbd_nl.c: In function ânl_trace_replyâ:drivers/block/drbd/drbd_nl.c:155: error: expected â)â before âDEVICE_NAMEâdrivers/block/drbd/drbd_nl.c:153: warning: unused variable ânlpâdrivers/block/drbd/drbd_nl.c: At top level:drivers/block/drbd/drbd_nl.c:164: error: expected â)â before â*â tokendrivers/block/drbd/drbd_nl.c:179: error: expected â)â before â*â tokendrivers/block/drbd/drbd_nl.c:234: error: expected â)â before â*â tokendrivers/block/drbd/drbd_nl.c:358: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âintâdrivers/block/drbd/drbd_nl.c:374: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âintâdrivers/block/drbd/drbd_nl.c:384: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âvoidâdrivers/block/drbd/drbd_nl.c:442: warning: âstruct Drbd_Confâ declared inside parameter listdrivers/block/drbd/drbd_nl.c:442: warning: its scope is only this definition or declaration, which is probably not what you wantdrivers/block/drbd/drbd_nl.c: In function âdrbd_determin_dev_sizeâ:drivers/block/drbd/drbd_nl.c:452: warning: implicit declaration of function âlc_try_lockâdrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:452: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:454: warning: implicit declaration of function âdrbd_md_first_sectorâdrivers/block/drbd/drbd_nl.c:454: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:455: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:456: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:459: warning: implicit declaration of function âdrbd_md_set_sector_offsetsâdrivers/block/drbd/drbd_nl.c:459: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:461: warning: implicit declaration of function âdrbd_new_dev_sizeâdrivers/block/drbd/drbd_nl.c:461: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:463: warning: implicit declaration of function âdrbd_get_capacityâdrivers/block/drbd/drbd_nl.c:463: error: dereferencing pointer to incomplete typedrivers/block/drbd/drbd_nl.c:464: warning: implicit declaration of function âdrbd_bm_capacityâdrivers/block/drbd/drbd_nl.c:466: warning: implicit declaration of function âdrbd_bm_resizeâdrivers/block/drbd/drbd_nl.c:471: warning: implicit declaration of_______________________________________________
drbd-dev mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-dev
Lars Ellenberg
maintainerQuoted 5 lines · Andreas John
Hello All,
Hello Lars,I don't want to bug you, but is there are chance that the problem gets fixed?
works for me.
Signature · 5 lines
: Lars Ellenberg Tel +43-1-8178292-0 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com : __ please use the "List-Reply" function of your email client.
Hey Lars,
confirmed. Runs here, too.
rgds + THX,
Andreas
Quoted 9 lines · Lars Ellenberg
Quoted 5 lines · Andreas John
Hello All,
Hello Lars,I don't want to bug you, but is there are chance that the problem gets fixed?
works for me.