1. cas_vfree implementation is now properly selected based on kernel version
2. cas_vfree semantics now accepts NULL pionter as a valid input
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
ocf_core_get_cache does not increment cache reference count, so
it shouldn't be paired with cache_put
Fixes#117
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
When core frome corepool is added to cache, it's old name is loaded and cores
in corepool cannot be referenced by name anyway so new name is not needed.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Instead of silently allowing for any core_id in order to set
core parameter for all cores in cache, check explicitly for
special value (OCF_CORE_ID_INVALID) which means that no core
has been selected.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Check if provided log level isn't greater than number of available log levels
Prevoius check was comparing log level to size of array with avaiable log levels
(in bytes).
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
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>