Commit Graph

178 Commits

Author SHA1 Message Date
Michal Mielewczyk
76acefd831 After loading cache mark used core ids.
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>
2019-09-11 02:08:28 -04:00
Michal Mielewczyk
7ecd537170 Fix setting core params.
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>
2019-09-04 07:48:04 -04:00
Michal Mielewczyk
9e05950845 Reset particular core stats only if core was specified by user.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-08-20 07:20:02 -04:00
Michal Mielewczyk
341222e3d7 Treat '16384' as valid cache id.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-08-20 03:42:05 -04:00
Michal Mielewczyk
56cbc6595b Pass name for newly initialized cache in array instead of pointer.
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>
2019-08-20 03:42:05 -04:00
Robert Baldyga
f038223979 Use name based OCF management API
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-08-16 14:08:34 +02:00
Michal Rakowski
eee7a0e220 Fix exported object cleanup in case of cache stop failure
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>
2019-07-17 15:09:39 +02:00
Michal Rakowski
47a150644c Doxygen fixup
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-07-17 09:43:43 +02:00
Michal Mielewczyk
c1b5ccbc75 Initialize structures with 0.
If 'open_cores' flag is not explicite set, cores migth not be added on cache
load.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-07-04 03:06:24 -04:00
Jan Musial
506ff687f7 Fix get_core_info trying to access already freed UUID
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-06-28 13:15:20 +02:00
Michal Rakowski
3ca9a14bb2 Use lookup_bdev generated macro instead of direct call
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-06-28 09:36:11 +02:00
Adam Rutkowski
f0b59c58d9
Merge pull request #53 from mmichal10/validate-core-config
Validate core config
2019-06-27 05:54:49 -04:00
Jan Musial
2964b56615 Fix leaking mngt_queue on load failure
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-06-27 10:54:37 +02:00
Michal Mielewczyk
db534a70b6 Check if given core device exists.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-26 12:37:53 -04:00
Michal Rakowski
a119a6ac2a Added check for dirty cache/core during cache stop/core removal 2019-06-26 09:32:26 +02:00
Michal Mielewczyk
0cb219d178 Fix old metadata detection.
Due the changes in ocf error codes adapter misinterpreted information about no
preexisting metadata.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-13 07:55:12 -04:00
Michal Mielewczyk
0208375202 Unified management functions prefix
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-06 09:46:40 -04:00
Robert Baldyga
23e330a21f Adapt to new cache lock API
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-06-04 15:24:55 +02:00
Michal Mielewczyk
1e5355eba1 Extending 'configure' script
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>
2019-05-30 06:29:07 -04:00
Robert Baldyga
077956f9a9 Pass cache_id to cache_mng_add_core_to_cache()
struct ocf_mngt_core_config no longer contains this information,
so we need to pass it as separate argument.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-24 18:14:17 +02:00
Robert Baldyga
0411f2d42f Handle non-interruptible flush
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-08 12:48:21 +02:00
Michal Mielewczyk
f62c53862d Add asserts in case of detached cache.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-04-19 03:59:43 -04:00
Michał Mielewczyk
e2c901de6d
Merge pull request #8 from arutk/fix-stop-error-handling
Abort cache deinit in case of ocf stop fatal error
2019-04-12 13:40:36 +02:00
Adam Rutkowski
cfaf0d279f Abort cache deinit in case of ocf stop fatal error
We should only proceed with deinitialization in case of cache
write error, not just any error.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-10 14:36:07 -04:00
Michal Mielewczyk
4655b397a0 Return appropiriate error code when adding core failed.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-04-10 05:09:07 -04:00
Michal Mielewczyk
54027e92ae Allow reset stats for all cores within cache instance at once.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-04-09 07:07:37 -04:00
Adam Rutkowski
9670adf751 Move querying for atomic device params before cache start
This needs to be done in caller application context. As part of asynchronous
management API rework, volume_open callback was moved to kernel worker thread
context. To work around this, atomic parameters are now read before cache
attach/load/probe and provided to bottom volume via volume params.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-02 14:47:39 -04:00
Robert Baldyga
94e8ca09e0 Initial commit
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-29 08:45:50 +01:00