Fusion-IO Cards and custom drivers

I was trying to use some Fusion-IO cards with Rockstor but was unsuccessful, basically you end up compiling the driver by using the kernel-devel package (I used kernel-ml-devel that I saw on another post) and the src.rpm for Centos7. The drivers are on the SanDisk/FusionIO site but I can easily share with anyone that cares (you DO NOT need fusionio cards to compile the driver, you also can specify a non-running kernel). I think the issue is very similar to others who are using 15.10 Ubuntu and newer kernels.

Generally you need the following packages:
yum install rsync tar gcc make kernel-devel-uname -rrpm-build

Then you run
rpmbuild --rebuild iomemory-vsl-<VSL-version>.src.rpm

TL;DR
Here is my error

Preserving configdir due to '-p' option: /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kfio_config

/usr/bin/make
-j8
-C /lib/modules/4.3.3-1.el7.elrepo.x86_64/build
FIO_DRIVER_NAME=iomemory-vsl
FIO_SCSI_DEVICE=False
FUSION_DRIVER_DIR=/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source
SUBDIRS=/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source
EXTRA_CFLAGS+="-I/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/include -DBUILDING_MODULE -DLINUX_IO_SCHED"
INSTALL_MOD_DIR=extra/fio
INSTALL_MOD_PATH=
KFIO_LIB=kfio/x86_64_cc48_libkfio.o_shipped
modules
make[1]: Entering directory /usr/src/kernels/4.3.3-1.el7.elrepo.x86_64' printf '#include "linux/module.h"\nMODULE_LICENSE("Proprietary");\n' >/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/license.c CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/main.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/pci.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/sysrq.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/driver_init.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kfio.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/state.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/errno.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kcache.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kfile.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmisc.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kscatter.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/ktime.o CC [M] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/sched.o /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kfio.c: In function 'kfio_bind_kthread_to_node': /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kfio.c:1074:9: error: implicit declaration of function 'cpus_weight' [-Werror=implicit-function-declaration] if (cpumask && cpus_weight(*cpumask)) ^ cc1: some warnings being treated as errors make[2]: *** [/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kfio.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.c: In function 'kfio_vmalloc': /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.c:645:5: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration] return vmalloc(size); ^ /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.c:645:5: warning: return makes pointer from integer without a cast [enabled by default] /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.c: In function 'kfio_vfree': /root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.c:661:5: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration] vfree(ptr); ^ cc1: some warnings being treated as errors make[2]: *** [/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source/kmem.o] Error 1 make[1]: *** [_module_/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source] Error 2 make[1]: Leaving directory/usr/src/kernels/4.3.3-1.el7.elrepo.x86_64’
make: *** [modules] Error 2
make: Leaving directory `/root/rpmbuild/BUILD/iomemory-vsl-3.2.11.1581/driver_source’

  • set +x
    ERROR:

error: Bad exit status from /var/tmp/rpm-tmp.Bc3Q3O (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Bc3Q3O (%build)

This is actually a Sandisk/Fusionio issue since their src.rpm isn’t compiling on the newer 4.2 or 4.3 kernel (as shown this is for 3.2). There is a workaround here but it is DANGEROUS as suggest, I may try and post results. https://github.com/sjuxax/iomemory-vsl

So in summary, this is NOT a rockstor problem, just an outdated driver for FusionIO

I also got one of the Fusion IO SX350 a 6.4Tb PCI-e Drive. Did you ever got it running I’m also having some difficulties gettin my IO SX350 to run on Rocksto system.

I did but had to recompile the drivers. The newer cards should be easier to deal with and sandisk seems to be updating their drivers. This post is old and is was for xenserver but it’s the same process.