blksnap
blksnap copied to clipboard
Problems compiling module with Slackware64-Current and kernel 6.9
Distribution
Slackware64-Current
Architecture
x86_64
Kernel version
6.9.5
Blksnap version
Branches VAL-6.0 or VAL-7.0 with commits as of 6/17/2024
Bug description
I am trying to compile the kernel module for use with Slackware64-Current. Before the kernel changed from 6.6 to 6.9, I had the module working with the VAL6.0 branch (as I am using Veeam 6.0), but now with kernel 6.9, I get the following output for "./mk.sh build"
Making ... make: Entering directory '/usr/src/linux-6.9.5' grep: warning: stray \ before # grep: warning: stray \ before # CC [M] /usr/src/blksnap/module/bdevfilter.o CC [M] /usr/src/blksnap/module/log.o CC [M] /usr/src/blksnap/module/big_buffer.o CC [M] /usr/src/blksnap/module/cbt_map.o CC [M] /usr/src/blksnap/module/chunk.o CC [M] /usr/src/blksnap/module/ctrl.o CC [M] /usr/src/blksnap/module/diff_io.o CC [M] /usr/src/blksnap/module/diff_area.o /usr/src/blksnap/module/log.c:246:5: warning: no previous prototype for ‘log_processor’ [-Wmissing-prototypes] 246 | int log_processor(void *data) | ^~~~~~~~~~~~~ /usr/src/blksnap/module/diff_area.c: In function ‘diff_area_free’: /usr/src/blksnap/module/diff_area.c:128:17: error: implicit declaration of function ‘blkdev_put’; did you mean ‘bdev_fput’? [-Wimplicit-function-declaration] 128 | blkdev_put(diff_area->orig_bdev, NULL); | ^~~~~~~~~~ | bdev_fput CC [M] /usr/src/blksnap/module/diff_buffer.o /usr/src/blksnap/module/ctrl.c:438:5: warning: no previous prototype for ‘ioctl_mod’ [-Wmissing-prototypes] 438 | int ioctl_mod(unsigned long arg) | ^~~~~~~~~ /usr/src/blksnap/module/ctrl.c:448:5: warning: no previous prototype for ‘ioctl_setlog’ [-Wmissing-prototypes] 448 | int ioctl_setlog(unsigned long arg) | ^~~~~~~~~~~~ CC [M] /usr/src/blksnap/module/diff_storage.o /usr/src/blksnap/module/diff_area.c: In function ‘diff_area_new’: /usr/src/blksnap/module/diff_area.c:283:16: error: implicit declaration of function ‘blkdev_get_by_dev’; did you mean ‘blkdev_get_no_open’? [-Wimplicit-function-declaration] 283 | bdev = blkdev_get_by_dev(dev_id, FMODE_READ | FMODE_WRITE, NULL, NULL); | ^~~~~~~~~~~~~~~~~ | blkdev_get_no_open /usr/src/blksnap/module/diff_area.c:283:14: error: assignment to ‘struct block_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 283 | bdev = blkdev_get_by_dev(dev_id, FMODE_READ | FMODE_WRITE, NULL, NULL); | ^ /usr/src/blksnap/module/diff_io.c:45:6: warning: no previous prototype for ‘diff_io_endio’ [-Wmissing-prototypes] 45 | void diff_io_endio(struct bio *bio) | ^~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:244: /usr/src/blksnap/module/diff_area.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /usr/src/blksnap/module/diff_storage.c: In function ‘diff_storage_free’: /usr/src/blksnap/module/diff_storage.c:123:17: error: implicit declaration of function ‘blkdev_put’; did you mean ‘bdev_fput’? [-Wimplicit-function-declaration] 123 | blkdev_put(storage_bdev->bdev, NULL); | ^~~~~~~~~~ | bdev_fput /usr/src/blksnap/module/diff_storage.c: In function ‘diff_storage_add_storage_bdev’: /usr/src/blksnap/module/diff_storage.c:162:16: error: implicit declaration of function ‘blkdev_get_by_dev’; did you mean ‘blkdev_get_no_open’? [-Wimplicit-function-declaration] 162 | bdev = blkdev_get_by_dev(dev_id, FMODE_READ | FMODE_WRITE, NULL, NULL); | ^~~~~~~~~~~~~~~~~ | blkdev_get_no_open /usr/src/blksnap/module/diff_storage.c:162:14: error: assignment to ‘struct block_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 162 | bdev = blkdev_get_by_dev(dev_id, FMODE_READ | FMODE_WRITE, NULL, NULL); | ^ make[2]: *** [scripts/Makefile.build:244: /usr/src/blksnap/module/diff_storage.o] Error 1 make[1]: *** [/usr/src/linux-6.9.5/Makefile:1918: /usr/src/blksnap/module] Error 2 make: *** [Makefile:240: __sub-make] Error 2 make: Leaving directory '/usr/src/linux-6.9.5'
Other branched of VAL-6.* give similar output. I am however able to compile using the VAL-7.0 branch, but when trying to load the module, it displays the following:
insmod: ERROR: could not insert module ./bdevfilter.ko: Operation not supported
and dmesg shows the following:
bdevfilter: Failed to get address of the 'get_option' bdevfilter: Failed to prepare pointers to internal functions
Trying to run "insmod blkveeamsnap.ko" results in:
insmod: ERROR: could not insert module veeamblksnap.ko: Unknown symbol in module
and dmesg shows:
veeamblksnap: Unknown symbol bdevfilter_register (err -2) veeamblksnap: Unknown symbol bdevfilter_free (err -2) veeamblksnap: Unknown symbol bdevfilter_detach_all (err -2) veeamblksnap: Unknown symbol bdevfilter_unregister (err -2) veeamblksnap: Unknown symbol submit_bio_noacct_notrace (err -2)
Assuming that the first four symbols are provided by the bdevfilter module, but wasn't sure about the last message so included it just in case.
Steps to reproduce
No response
Expected behavior
No response
Additional information
No response