itri-sofa / sofa

SOFA (Software Orchestrated Flash Array) is a log-structured flash array management system
Apache License 2.0
41 stars 11 forks source link

Unable to build Linux kernel module for v4.15 #1

Open jserv opened 4 years ago

jserv commented 4 years ago

I managed to build sofa on Ubuntu Linux 18.04-LTS which is based on Linux kernel version 4.15. However, I failed to build Linux kernel module. Here are the instructions to reproduce:

cd src
sh build_sofa.sh

The build system complained as following:

sofa/src/storage_core/lfsm/common/mem_manager.c: In function 'init_memory_manager':
sofa/src/storage_core/lfsm/common/mem_manager.c:42:10: error: implicit declaration of function 'bioset_init'; did you mean 'bio_init'? [-Werror=implicit-function-declaration]
          bioset_init(&memMgr.bioset, bio_pool_size, 0,
          ^~~~~~~~~~~
          bio_init
sofa/src/storage_core/lfsm/common/mem_manager.c: In function 'rel_memory_manager':
sofa/src/storage_core/lfsm/common/mem_manager.c:115:5: error: implicit declaration of function 'bioset_exit'; did you mean 'bioset_free'? [-Werror=implicit-function-declaration]
     bioset_exit(&memMgr.bioset);
     ^~~~~~~~~~~
     bioset_free
cc1: some warnings being treated as errors
nmra commented 4 years ago

ITRI-SOFA is developed and compiled on Centos 8 which is based on kernel 4.18. We did not run SOFA on Ubuntu. In the future we will support fedora and ubuntu platforms. On Fedora 29, we have verified that it is executable.

jserv commented 4 years ago

Linux 4.18 replaced bioset{create,free} with bioset{init,exit}. Check this patch for details: https://github.com/crawfxrd/dattobd/commit/c9e1e0117e8c1bd51a3cfe88701cb86573f30df9

nmra commented 4 years ago

Thanks for your suggestion, we will fix this problem in the next version