iomemory-vsl icon indicating copy to clipboard operation
iomemory-vsl copied to clipboard

[BUG] Does not build on Centos8-Stream

Open jadams opened this issue 2 years ago • 6 comments

Bug description

Module does not build on Centos8-Stream with current kernel (4.18.0-383.el8.x86_64).

How to reproduce

[root@centos ~]# git clone https://github.com/RemixVSL/iomemory-vsl.git
Cloning into 'iomemory-vsl'...
remote: Enumerating objects: 2809, done.
remote: Counting objects: 100% (242/242), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 2809 (delta 233), reused 204 (delta 204), pack-reused 2567
Receiving objects: 100% (2809/2809), 12.11 MiB | 20.57 MiB/s, done.
Resolving deltas: 100% (1544/1544), done.
[root@centos ~]# cd iomemory-vsl/
[root@centos iomemory-vsl]# make module
cd root/usr/src/iomemory-vsl-3.2.16 && \
  		make clean
make[1]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make \
        -j16 \
	-C /lib/modules/4.18.0-383.el8.x86_64/build \
	FIO_DRIVER_NAME=iomemory-vsl \
	FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
	KFIO_LIB=kfio/x86_64_cc85_libkfio.o_shipped \
	clean
make[2]: Entering directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
make[2]: Leaving directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
rm -rf include/fio/port/linux/kfio_config.h kfio_config license.c
make[1]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
cd root/usr/src/iomemory-vsl-3.2.16 && \
  		make gpl
make[1]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
sed -i 's/Proprietary/GPL/g' Kbuild

Change found in target kernel: KERNELVER KERNEL_SRC
Running clean before building driver

make[2]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make \
        -j16 \
	-C /lib/modules/4.18.0-383.el8.x86_64/build \
	FIO_DRIVER_NAME=iomemory-vsl \
	FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
	KFIO_LIB=kfio/x86_64_cc85_libkfio.o_shipped \
	clean
make[3]: Entering directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
make[3]: Leaving directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
rm -rf include/fio/port/linux/kfio_config.h kfio_config license.c
make[2]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
if [ "85" -gt "74" ];then \
	if [ ! -f "kfio/x86_64_cc85_libkfio.o_shipped" ];then \
		cp kfio/x86_64_cc74_libkfio.o_shipped kfio/x86_64_cc85_libkfio.o_shipped; \
	fi \
fi
./kfio_config.sh -a x86_64 -o include/fio/port/linux/kfio_config.h -k /lib/modules/4.18.0-383.el8.x86_64/build -p -d /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_config -l 0 -s /lib/modules/4.18.0-383.el8.x86_64/source
Detecting Kernel Flags
Config dir         : /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_config
Output file        : include/fio/port/linux/kfio_config.h
Kernel output dir  : /lib/modules/4.18.0-383.el8.x86_64/build
Kernel source dir  : /lib/modules/4.18.0-383.el8.x86_64/source
Starting tests:
  1653584338.950  KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS...
  1653584338.974  KFIOC_X_TASK_HAS_CPUS_MASK...
  1653584338.991  KFIOC_X_LINUX_HAS_PART_STAT_H...
  1653584339.015  KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS...
  1653584339.034  KFIOC_X_BLK_ALLOC_DISK_EXISTS...
  1653584339.056  KFIOC_X_HAS_MAKE_REQUEST_FN...
  1653584339.079  KFIOC_X_GENHD_PART0_IS_A_POINTER...
  1653584339.102  KFIOC_X_BIO_HAS_BI_BDEV...
  1653584339.123  KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T...
  1653584339.144  KFIOC_X_VOID_ADD_DISK...
  1653584339.166  KFIOC_X_DISK_HAS_OPEN_MUTEX...
Started tests, waiting for completions...
  1653584341.244  KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS=0
  1653584342.338  KFIOC_X_TASK_HAS_CPUS_MASK=1
  1653584342.408  KFIOC_X_LINUX_HAS_PART_STAT_H=0
  1653584342.486  KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS=0
  1653584342.562  KFIOC_X_BLK_ALLOC_DISK_EXISTS=0
  1653584342.614  KFIOC_X_HAS_MAKE_REQUEST_FN=1
  1653584342.671  KFIOC_X_GENHD_PART0_IS_A_POINTER=0
  1653584342.723  KFIOC_X_BIO_HAS_BI_BDEV=0
  1653584342.774  KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T=1
  1653584342.815  KFIOC_X_VOID_ADD_DISK=1
  1653584342.856  KFIOC_X_DISK_HAS_OPEN_MUTEX=0
Finished
1653584342.882  Exiting
Preserving configdir due to '-p' option: /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_config
grep: license.c: No such file or directory

Adding module version 4.18.0-a727d9d-3.2.16 to source license.c

make \
    -j16 \
-C /lib/modules/4.18.0-383.el8.x86_64/build \
FIO_DRIVER_NAME=iomemory-vsl \
FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
INSTALL_MOD_DIR=extra/fio \
INSTALL_MOD_PATH= \
KFIO_LIB=kfio/x86_64_cc85_libkfio.o_shipped \
modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/main.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/license.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/pci.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/sysrq.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/driver_init.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/errno.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/state.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcache.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfile.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kmem.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_common.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcpu.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kscatter.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/ktime.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/sched.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/cdev.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcondvar.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kinfo.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kexports.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/khotplug.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcsr.o
  SHIPPED /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio/x86_64_cc85_libkfio.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/module_param.o
In file included from /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:50:
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include/kblock_meta.h:37:9: error: "KFIOC_X_BLK_ALLOC_QUEUE_EXISTS" is not defined, evaluates to 0 [-Werror=undef]
   #elif KFIOC_X_BLK_ALLOC_QUEUE_EXISTS
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c: In function ‘kfio_alloc_queue’:
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include/kblock_meta.h:40:45: error: passing argument 1 of ‘blk_alloc_queue’ makes integer from pointer without a cast [-Werror=int-conversion]
     #define BLK_ALLOC_QUEUE blk_alloc_queue(kfio_make_request, node);
                                             ^~~~~~~~~~~~~~~~~
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:940:10: note: in expansion of macro ‘BLK_ALLOC_QUEUE’
     rq = BLK_ALLOC_QUEUE;
          ^~~~~~~~~~~~~~~
In file included from /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/port-internal.h:63,
                 from /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:32:
./include/linux/blkdev.h:1222:23: note: expected ‘gfp_t’ {aka ‘unsigned int’} but argument is of type ‘unsigned int (*)(struct request_queue *, struct bio *)’
 struct request_queue *blk_alloc_queue(gfp_t);
                       ^~~~~~~~~~~~~~~
In file included from /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:50:
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include/kblock_meta.h:40:29: error: too many arguments to function ‘blk_alloc_queue’
     #define BLK_ALLOC_QUEUE blk_alloc_queue(kfio_make_request, node);
                             ^~~~~~~~~~~~~~~
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:940:10: note: in expansion of macro ‘BLK_ALLOC_QUEUE’
     rq = BLK_ALLOC_QUEUE;
          ^~~~~~~~~~~~~~~
In file included from /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/port-internal.h:63,
                 from /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:32:
./include/linux/blkdev.h:1222:23: note: declared here
 struct request_queue *blk_alloc_queue(gfp_t);
                       ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:315: /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1577: _module_/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
make[1]: *** [Makefile:136: modules] Error 2
make[1]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make: *** [Makefile:31: module] Error 2

Possible solution

I assume back ports from kernel 5+ are breaking changes

Environment information

[root@centos ~]# uname -a
Linux centos8stream 4.18.0-383.el8.x86_64 #1 SMP Wed Apr 20 15:38:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@centos ~]# gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-13)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@centos ~]# cat /etc/os-release
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

jadams avatar May 27 '22 14:05 jadams

@jadams thanks for the bug report!. Could you try the branch bug-#106. I think I forgot to merge something back. Let me know if it works so I can move this to main.

Cheers!

snuf avatar May 28 '22 03:05 snuf

I appreciate the very quick response.

Unfortunately still an error with kfifo_make_request

Script started on 2022-05-29 21:58:22-04:00
0;root@centos:~
[root@centos ~]# ls
10417.log  anaconda-ks.cfg  iomemory-vsl
0;root@centos:~
[root@centos ~]# rm -rf iomemory-vsl/
0;root@centos:~
VSL/iomemory-vslit statucd iomemory-vslgit clone -b bug-#106 https://github.com/RemixV
Cloning into 'iomemory-vsl'...
remote: Enumerating objects: 2816, done.
remote: Counting objects: 100% (249/249), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 2816 (delta 236), reused 210 (delta 207), pack-reused 2567
Receiving objects: 100% (2816/2816), 12.11 MiB | 21.49 MiB/s, done.
Resolving deltas: 100% (1547/1547), done.
0;root@centos:~
[root@centos ~]# cd iomemory-vsl/
0;root@centos:~/iomemory-vsl
[root@centos iomemory-vsl]# make module
cd root/usr/src/iomemory-vsl-3.2.16 && \
  		make clean
make[1]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make \
        -j16 \
	-C /lib/modules/4.18.0-383.el8.x86_64/build \
	FIO_DRIVER_NAME=iomemory-vsl \
	FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
	KFIO_LIB=kfio/x86_64_cc85_libkfio.o_shipped \
	clean
make[2]: Entering directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
make[2]: Leaving directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
rm -rf include/fio/port/linux/kfio_config.h kfio_config license.c
make[1]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
cd root/usr/src/iomemory-vsl-3.2.16 && \
  		make gpl
make[1]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
sed -i 's/Proprietary/GPL/g' Kbuild

Change found in target kernel: KERNELVER KERNEL_SRC 
Running clean before building driver

make[2]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make \
        -j16 \
	-C /lib/modules/4.18.0-383.el8.x86_64/build \
	FIO_DRIVER_NAME=iomemory-vsl \
	FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
	KFIO_LIB=kfio/x86_64_cc85_libkfio.o_shipped \
	clean
make[3]: Entering directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
make[3]: Leaving directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
rm -rf include/fio/port/linux/kfio_config.h kfio_config license.c
make[2]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
if [ "85" -gt "74" ];then \
	if [ ! -f "kfio/x86_64_cc85_libkfio.o_shipped" ];then \
		cp kfio/x86_64_cc74_libkfio.o_shipped kfio/x86_64_cc85_libkfio.o_shipped; \
	fi \
fi
./kfio_config.sh -a x86_64 -o include/fio/port/linux/kfio_config.h -k /lib/modules/4.18.0-383.el8.x86_64/build -p -d /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_config -l 0 -s /lib/modules/4.18.0-383.el8.x86_64/source
Detecting Kernel Flags
Config dir         : /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_config
Output file        : include/fio/port/linux/kfio_config.h
Kernel output dir  : /lib/modules/4.18.0-383.el8.x86_64/build
Kernel source dir  : /lib/modules/4.18.0-383.el8.x86_64/source
Starting tests:
  1653875932.437  KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS...
  1653875932.462  KFIOC_X_TASK_HAS_CPUS_MASK...
  1653875932.482  KFIOC_X_LINUX_HAS_PART_STAT_H...
  1653875932.515  KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS...
  1653875932.545  KFIOC_X_BLK_ALLOC_QUEUE_EXISTS...
  1653875932.571  KFIOC_X_BLK_ALLOC_DISK_EXISTS...
  1653875932.596  KFIOC_X_HAS_MAKE_REQUEST_FN...
  1653875932.622  KFIOC_X_GENHD_PART0_IS_A_POINTER...
  1653875932.644  KFIOC_X_BIO_HAS_BI_BDEV...
  1653875932.674  KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T...
  1653875932.703  KFIOC_X_VOID_ADD_DISK...
  1653875932.727  KFIOC_X_DISK_HAS_OPEN_MUTEX...
Started tests, waiting for completions...
  1653875934.817  KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS=0
  1653875935.882  KFIOC_X_TASK_HAS_CPUS_MASK=1
  1653875935.953  KFIOC_X_LINUX_HAS_PART_STAT_H=0
  1653875936.043  KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS=0
  1653875936.152  KFIOC_X_BLK_ALLOC_QUEUE_EXISTS=1
  1653875936.253  KFIOC_X_BLK_ALLOC_DISK_EXISTS=0
  1653875936.348  KFIOC_X_HAS_MAKE_REQUEST_FN=1
  1653875936.443  KFIOC_X_GENHD_PART0_IS_A_POINTER=0
  1653875936.530  KFIOC_X_BIO_HAS_BI_BDEV=0
  1653875936.605  KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T=1
  1653875936.683  KFIOC_X_VOID_ADD_DISK=1
  1653875936.755  KFIOC_X_DISK_HAS_OPEN_MUTEX=0
Finished
1653875936.786  Exiting
Preserving configdir due to '-p' option: /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_config
grep: license.c: No such file or directory

Adding module version 4.18.0-2e26eb5-3.2.16 to source license.c

make \
    -j16 \
-C /lib/modules/4.18.0-383.el8.x86_64/build \
FIO_DRIVER_NAME=iomemory-vsl \
FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
INSTALL_MOD_DIR=extra/fio \
INSTALL_MOD_PATH= \
KFIO_LIB=kfio/x86_64_cc85_libkfio.o_shipped \
modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/main.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/license.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/pci.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/sysrq.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/driver_init.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/errno.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/state.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcache.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfile.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kmem.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio_common.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcpu.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kscatter.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/ktime.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/sched.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/cdev.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcondvar.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kinfo.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kexports.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/khotplug.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kcsr.o
  SHIPPED /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio/x86_64_cc85_libkfio.o
  CC [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/module_param.o
/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.c:1094:21: error: ‘kfio_make_request’ defined but not used [-Werror=unused-function]
 static unsigned int kfio_make_request(struct request_queue *queue, struct bio *bio)
                     ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:315: /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kblock.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1577: _module_/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.18.0-383.el8.x86_64'
make[1]: *** [Makefile:136: modules] Error 2
make[1]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make: *** [Makefile:31: module] Error 2
0;root@centos:~/iomemory-vsl
[root@centos iomemory-vsl]# exit
exit

Script done on 2022-05-29 21:59:12-04:00

jadams avatar May 30 '22 12:05 jadams

@jadams thanks for the update, this is a different problem though. You're on a 4.18 kernel, which has some things merged in that are newer and some ancient things that have been removed from the Linux kernel about a decade ago. I think removing the KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS test will probably fix it. Though looking at the comments in the config it might break some things in 5.X somewhere, so I need to double check/verify what/if things will break upstream by removing/changing that test. Generally we don't support old kernels, though I think this is fixable.

snuf avatar May 30 '22 23:05 snuf

@jadams I've pushed a change to the specific branch that removes the check for the kfio_make_request. Which should get you to compile.

snuf avatar May 30 '22 23:05 snuf

Seems to be working now, thanks for doing that, I really appreciate your work on this!

jadams avatar May 31 '22 12:05 jadams

NP, I need to find a way to merge this back. Looking at past kernels blk_alloc_queue_node has been in since 4.6, so I think it's safe to remove the queue_node check probably, but that means some salvaging has to be done on kblock_meta.h for the macros.

snuf avatar May 31 '22 16:05 snuf

The fio-3.2.16.1732 branch fully supports older Rhel based kernels as they are just backwards compatible it seems (thanks @aquacow).

  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio/.x86_64_cc48_libkfio.o.cmd for /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/kfio/x86_64_cc48_libkfio.o
  CC      /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/iomemory-vsl.mod.o
  LD [M]  /root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/iomemory-vsl.ko
make[1]: Leaving directory `/usr/src/kernels/4.19.0+1-x86_64'

Ok: altered version for iomemory-vsl.ko appended f3bb361

[10:08 xcp-ng-agkjbbcs iomemory-vsl-3.2.16]# uname -a
Linux xcp-ng-agkjbbcs 4.19.0+1 #1 SMP Thu Jan 13 12:55:45 CET 2022 x86_64 x86_64 x86_64 GNU/Linux
[10:10 xcp-ng-agkjbbcs iomemory-vsl-3.2.16]# git branch -v
* fio-3.2.16.1732 f3bb361 older compilers don't like -Werror=frame-larger-than=. As there is already a -Werror, just us -Wframe-larger-than, as other tests also seem to do
  main            944be2c Merge pull request #109 from TheBoroer/patch-1
[10:10 xcp-ng-agkjbbcs iomemory-vsl-3.2.16]# 

snuf avatar Sep 08 '22 15:09 snuf