datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
569 stars 121 forks source link

Installation fails on openSUSE 15.3/ kernel 5.3.18-57 #253

Open tsat21 opened 3 years ago

tsat21 commented 3 years ago

OpenSUSE 15.3 kernel 5.3.18-57 fails to generate dattobd. There is no issue up to kernel 5.3.18-lp152.78 of openSUSE 15.2. I tried Ver 0.10.15.

make -C src make[1]: Entering directory '/root/dattobd-master/src' if [ ! -f kernel-config.h ] || tail -1 kernel-config.h | grep -qv '#endif'; then mkdir configure-tests/feature-tests/build; ./genconfig.sh "5.3.18-57-default" "-w"; fi; make -C /lib/modules/5.3.18-57-default/build M=/root/dattobd-master/src modules make[2]: Entering directory '/usr/src/linux-5.3.18-57-obj/x86_64/default' CC [M] /root/dattobd-master/src/dattobd.o /root/dattobd-master/src/dattobd.c:546:36: error: unknown type name ‘make_request_fn’; did you mean ‘NR_request_key’? static inline int dattobd_call_mrf(make_request_fn fn, struct request_queue q, struct bio bio){ ^~~~~~~ __NR_request_key /root/dattobd-master/src/dattobd.c:860:2: error: unknown type name ‘make_request_fn’ make_request_fn sd_orig_mrf; //block device's original make request function ^~~~~~~ /root/dattobd-master/src/dattobd.c: In function ‘snap_mrf_thread’: /root/dattobd-master/src/dattobd.c:2769:9: error: implicit declaration of function ‘dattobd_call_mrf’; did you mean ‘dattobd_get_mnt’? [-Werror=implicit-function-declaration] ret = dattobd_call_mrf(dev->sd_orig_mrf, dattobd_bio_get_queue(bio), bio); ^~~~ dattobd_get_mnt /root/dattobd-master/src/dattobd.c: In function ‘tracing_mrf’: /root/dattobd-master/src/dattobd.c:3111:2: error: unknown type name ‘make_request_fn’; did you mean ‘__NR_request_key’? make_request_fn *orig_mrf = NULL; ^~~~~~~ NR_request_key /root/dattobd-master/src/dattobd.c: At top level: /root/dattobd-master/src/dattobd.c:3197:53: error: unknown type name ‘make_request_fn’; did you mean ‘NR_request_key’? static int find_orig_mrf(struct block_device *bdev, make_request_fn **mrf){ ^~~~~~~ NR_request_key /root/dattobd-master/src/dattobd.c: In function ‘tracer_should_reset_mrf’: /root/dattobd-master/src/dattobd.c:3230:8: error: ‘struct request_queue’ has no member named ‘make_request_fn’; did you mean ‘nr_requests’? if(q->make_request_fn != tracing_mrf) return 0; ^~~~~~~ nr_requests /root/dattobd-master/src/dattobd.c: At top level: /root/dattobd-master/src/dattobd.c:3244:92: error: unknown type name ‘make_request_fn’; did you mean ‘NR_request_key’? nsition_tracing(struct snap_device dev, struct block_device bdev, make_request_fn new_mrf, struct snap_device dev_ptr){ ^~~~~~~ NR_request_key /root/dattobd-master/src/dattobd.c: In function ‘tracer_setup_snap’: /root/dattobd-master/src/dattobd.c:3624:2: error: implicit declaration of function ‘blk_queue_make_request’; did you mean ‘blk_queue_max_segments’? [-Werror=implicit-function-declaration] blk_queue_make_request(dev->sd_queue, snap_mrf); ^~~~~~ blk_queue_max_segments /root/dattobd-master/src/dattobd.c: In function ‘tracer_destroy_tracing’: /root/dattobd-master/src/dattobd.c:3750:38: error: implicit declaration of function ‘tracer_transition_tracing’; did you mean ‘tracer_destroy_tracing’? [-Werror=implicit-function-declaration] if(tracer_should_reset_mrf(dev)) tracer_transition_tracing(NULL, dev->sd_base_dev, dev->sd_orig_mrf, &snap_devices[dev->sd_minor]); ^~~~~~~ tracer_destroy_tracing /root/dattobd-master/src/dattobd.c: In function ‘__tracer_setup_tracing’: /root/dattobd-master/src/dattobd.c:3782:8: error: implicit declaration of function ‘find_orig_mrf’; did you mean ‘find_pid_ns’? [-Werror=implicit-function-declaration] ret = find_orig_mrf(dev->sd_base_dev, &dev->sd_orig_mrf); ^~~~~ find_pid_ns cc1: some warnings being treated as errors make[4]: [/usr/src/linux-5.3.18-57/scripts/Makefile.build:288: /root/dattobd-master/src/dattobd.o] Error 1 make[3]: [/usr/src/linux-5.3.18-57/Makefile:1670: module/root/dattobd-master/src] Error 2 make[2]: [../../../linux-5.3.18-57/Makefile:179: sub-make] Error 2 make[2]: Leaving directory '/usr/src/linux-5.3.18-57-obj/x86_64/default' make[1]: [Makefile:14: default] Error 2 make[1]: Leaving directory '/root/dattobd-master/src' make: [Makefile:24: driver] Error 2

nixomose commented 3 years ago

this is the same issue as the "won't build on kernel 5.8 or 5.10" issue. the suse guys must have backported some later 5.8+ kernel changes, so the latest dattobd won't build against those kernels or apparently the opensuse one.

I'm working on it.

nixomose commented 3 years ago

duplicate of https://github.com/datto/dattobd/issues/234