build break under dysk/module
andyzhangx opened this issue · 8 comments
under dysk/module: make
make -C /lib/modules/4.4.0-104-generic/build/ M=/code2/dysk/module modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-104-generic'
CC [M] /code2/dysk/module/dysk_bdd.o
/code2/dysk/module/dysk_bdd.c: In function ‘io_hook’:
/code2/dysk/module/dysk_bdd.c:897:2: error: implicit declaration of function ‘blk_queue_max_write_zeroes_sectors’ [-Werror=implicit-function-declaration]
blk_queue_max_write_zeroes_sectors(rq, 0);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/code2/dysk/module/dysk_bdd.o' failed
make[2]: *** [/code2/dysk/module/dysk_bdd.o] Error 1
Makefile:1423: recipe for target 'module/code2/dysk/module' failed
make[1]: *** [module/code2/dysk/module] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-104-generic'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2
Workaround:
comment dysk/module/dysk_bdd.c:897
can you do a uname -r and share results?
I have been testing against 4.10.x and 4.11.x both standard linux images and linux -azure images
btw commenting these out will break disks randomly when they issue write-same/write-zero style I/O requests. best is to figure out what is wrong
o, it's 4.4.0-104-generic
, and under '4.11.0-1016-azure', it works well
Cool - I’ll add kernel version validation for this.
Please use standard account until I figure out what is wrong with premium
Added a preprocessor to defend against building on older kernels.
Not sure if I'm doing something wrong here.
sajay@ubuntu:~/code/src/github.com/khenidak/dysk/module$ make
make -C /lib/modules/4.4.0-124-generic/build/ M=/home/sajay/code/src/github.com/khenidak/dysk/module modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-124-generic'
CC [M] /home/sajay/code/src/github.com/khenidak/dysk/module/dysk_bdd.o
/home/sajay/code/src/github.com/khenidak/dysk/module/dysk_bdd.c: In function ‘io_hook’:
/home/sajay/code/src/github.com/khenidak/dysk/module/dysk_bdd.c:933:5: error: implicit declaration of function ‘blk_queue_max_write_zeroes_sectors’ [-Werror=implicit-function-declaration]
blk_queue_max_write_zeroes_sectors(rq, 0);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:277: recipe for target '/home/sajay/code/src/github.com/khenidak/dysk/module/dysk_bdd.o' failed
make[2]: *** [/home/sajay/code/src/github.com/khenidak/dysk/module/dysk_bdd.o] Error 1
Makefile:1426: recipe for target '_module_/home/sajay/code/src/github.com/khenidak/dysk/module' failed
make[1]: *** [_module_/home/sajay/code/src/github.com/khenidak/dysk/module] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-124-generic'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2
sajay@ubuntu:~/code/src/github.com/khenidak/dysk/module$ uname -r
4.4.0-124-generic
OK 4.4 doesn't work and updating to 4.11.xxx does build fine.
Basically was wondering if the fix would enable 4.4 kernels to compile this.
Ideally would have been nice but not a concern since I’m unblocked.
it should be building on 3.9++ let me check.