Since OCF doesn't use core and cache ids anymore adapter has to track occupied
ids on its own. After loading cache, ids of all loaded cores should be marked as
occupied, otherwise adding new core without explicit specifying core id will
fail.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
If core id wasn't specified, function was returning error insted of setting
given param for all cores.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Kernel's 'make kernelversion' does not print some extra version tags
(like 4.19-xxx) so there was a problem with installing CAS on some
kernels. Moved it back to using just 'uname -r'.
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Currently Open-CAS uses single queue block interface,
which is removed in kernel in version 5.0.
From this moment on Open-CAS supports only blk-mq,
and single queue is not supported any longer.
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Unitl now pointer to local variable was passed to OCF and it's content could be
overwriten after leaving function responsible for preparing cache config.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
While unloading cas_cache module, volume types were deinitialized, although core
pool still wasn't empty. Now this deinitialization can be done after removing
cores from core pool, and before context is freed.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
In case of error during cache stop exported object is not being restored after destroying.
This may result in bug in case of calling stop once more.
This commit fixes this issue - exported objects are restored.
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Shell command evaluation should be performed using 'shell'
function. This fixes 'make install'.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
KERNEL_DIR environment variable can be used to configure
and make CAS with custom kernel source path.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
Due the changes in ocf error codes adapter misinterpreted information about no
preexisting metadata.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Functions and macros dependent on different kernel versions are now generated
before compilation basing on current kernel capabilities instead of hardcoding
them for specific kernels.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>