Michal Mielewczyk
433a25a1b2
Renamed 'added' flag in core metadata to 'valid'.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-08-06 07:08:12 -04:00
Michal Mielewczyk
5dd09e823b
Initialize promotion policy before cleaning policy.
...
If cleaning policy didn't have init() function,
'_ocf_mngt_init_instance_load_complete' returned early and promotion policy
wasn't initialized at all.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-08-06 06:37:14 -04:00
Michal Mielewczyk
340ca76159
Move check for valid cache size in load.
...
Loaded cache size should be compared with acutal cache size after loading
superblock.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-08-05 07:58:38 -04:00
Robert Baldyga
92c7e12549
Remove core id from public API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-30 09:26:26 +02:00
Robert Baldyga
1100cb0b4f
Remove cache id from public API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-30 09:26:26 +02:00
Robert Baldyga
259df7ace9
Store core name in metadata
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-30 09:26:26 +02:00
Robert Baldyga
eb4272afa9
Store cache name in metadata
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-30 09:26:17 +02:00
Robert Baldyga
4f0735b503
Ensure that core name is set and unique
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-29 17:37:48 +02:00
Robert Baldyga
901b39031f
Ensure that cache name is set and unique
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-29 17:37:43 +02:00
Robert Baldyga
331b99397f
Change ctx lock to rmutex
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-07-29 15:08:44 +02:00
Adam Rutkowski
e5bed8825c
Move metadata concurrency to a separate file
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2019-07-24 15:32:09 -04:00
Jan Musiał
1fd1a6fe17
Merge pull request #209 from arutk/stop_no_queue
...
Allow to stop cache without management queue
2019-07-23 13:51:21 +02:00
Jan Musial
917cbd859a
Add promotion policy API and use it in I/O path
...
Promotion policy is supposed to perform ALRU noise filtering by
eliminating one-hit wonders being added to cache and polluting it.
Signed-off-by: Jan Musial <jan.musial@intel.com >
2019-07-19 13:52:00 +02:00
Adam Rutkowski
4f04b2762f
Simplified stop path for cache detached case
...
When cache is detached we cannot assume there is a management
queue created. This change introduces simplified cache stop
path, performing all the necessary deinit without using
IO queues.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2019-07-08 18:26:35 -04:00
Michal Mielewczyk
636834dae3
Check for existing metadata when attaching cache.
...
Instead of overriding existing metadata silently, return appropriate error.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-07-08 09:23:32 -04:00
Jan Musial
2c629be4c2
Fix leaking front and core volumes
...
Signed-off-by: Jan Musial <jan.musial@intel.com >
2019-06-26 10:00:49 +02:00
Michal Rakowski
b1a6c467a0
Introduce core_is_dirty mngt method
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com >
2019-06-25 09:12:44 +02:00
Michal Rakowski
a818ffabfd
Move ocf_mngt_cache_is_dirty to public mngt interface
2019-06-24 15:23:06 +02:00
Michal Rakowski
2925147395
Remove reduntant dirty check
...
When flush completion is called there could be some clines marked as dirty since those could be in-use during flushing.
2019-06-24 14:24:34 +02:00
Jan Musial
aec01f216c
Revert "Disallow ocf_cache_mode_max in io_class config"
...
This reverts commit 5ad5c521df
.
This change broke setting IO-classes with allocation. We use max as a
special value to indicate that the partition should use cache global
caching mode.
2019-06-14 14:08:28 +02:00
Adam Rutkowski
b97bb6f53b
Add function to check for lazy write cache mode (WO or WB)
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2019-06-12 12:07:02 -04:00
Adam Rutkowski
82e8c55f4a
Write-only cache mode
...
Write-only cache mode is similar to writeback, however read
operations do not promote data to cache. Reads are mostly serviced
by the core device, only dirty sectors are fetched from the cache.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2019-06-12 12:07:02 -04:00
Michal Mielewczyk
328d27846a
Prevent overriding null terminator in cache name
2019-06-11 12:12:07 +02:00
Michal Mielewczyk
fc5334e419
Return memcpy result
2019-06-11 12:12:07 +02:00
Michal Rakowski
29199cb5d4
Added missing metadata_unlock
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com >
2019-06-11 12:12:07 +02:00
Michal Rakowski
b1cf6c4642
Changed always returning 0 to void foo
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com >
2019-06-11 09:53:40 +02:00
Michal Rakowski
30ac3abd74
Small get_ram_needed fix, proper volume is initialized now.
2019-06-11 09:53:40 +02:00
Michal Mielewczyk
be64173066
Fix order of operations in cache stop completion
...
Prevent metadata updater being freed by pyocf before it's deinitialized by ocf.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-06-06 09:03:26 -04:00
Michal Mielewczyk
e6bedb692c
Unified management functions prefix.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-06-05 09:31:59 -04:00
Michal Rakowski
9f4536c6e3
Error codes in IO path changed to OCF-specific
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com >
2019-06-05 09:10:54 +02:00
Robert Baldyga
711de86bff
Associate core metadata with core object
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-28 14:49:59 +02:00
Robert Baldyga
46ae8b2ff1
Remove unused OCF_ERR_CACHE_IN_USE error code
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-28 11:20:48 +02:00
Robert Baldyga
8a82be339f
Introduce asynchronous cache lock
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-28 11:20:48 +02:00
Robert Baldyga
bdcd4df0ef
Remove utils_device.h
...
Move core mngt related code to ocf_mngt_core.c
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-27 17:00:39 +02:00
Robert Baldyga
7de56940a4
Move ocf_request from utils
...
ocf_request has always been first class citizen in OCF,
so lets place it along with another essential objects.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-27 15:51:27 +02:00
Jan Musiał
93a06686a7
Merge pull request #165 from robertbaldyga/ctx-get-put
...
Give ocf_ctx get/put semantics
2019-05-24 14:29:04 +02:00
Robert Baldyga
c903d13ad2
Give ocf_ctx get/put semantics
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-23 15:50:10 +02:00
Robert Baldyga
efa96ef7bd
Add ocf_cache_line_size_none
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-23 13:29:49 +02:00
Robert Baldyga
2cf2a59584
Add open_cores parameter to ocf_mngt_cache_device_config
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-21 18:18:33 +02:00
Michal Rakowski
76bcac5b45
Merge pull request #160 from robertbaldyga/remove-unnecessary-attach-step
...
Remove unnecessary attach step
2019-05-21 14:02:19 +02:00
Robert Baldyga
5ad5c521df
Disallow ocf_cache_mode_max in io_class config
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-21 09:33:33 +02:00
Robert Baldyga
e8bf299176
Remove unnecessary attach step
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-21 09:17:39 +02:00
Michal Rakowski
0412e05260
Merge pull request #73 from mmichal10/cleaner-kick
...
Add kick function for cleaner
2019-05-10 14:33:49 +02:00
Michal Mielewczyk
7165bc16c3
Add kick function for cleaner
...
ocf_kick_cleaner() allows to perfom cleaning immediately.
Nop cleaning policy now returns new 'OCF_CLEANER_DISABLE' macro which indicates
that cleaing shouldn't be performed. To enable it back, ocf_kick_cleaner()
should be called.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-05-10 08:09:56 -04:00
Michał Wysoczański
a145815747
Merge pull request #149 from Donaim/master
...
Set core_id during load if user did not specify one
2019-05-10 12:59:07 +02:00
Robert Baldyga
580d5506cd
Stop treating UUID as ANSI string
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2019-05-10 12:49:51 +02:00
Vitaliy Mysak
8391300bc8
Set core_id during load if user did not specify one
...
If cfg->core_id is OCF_CORE_MAX and that core matches the UUID of
existing not opened one, then set cfg->core_id to id of that core.
This is useful when loading cache from metadata: if user does not store
the ids of cores but relies on OCF to assign them, there is no need to
not reassign them on load.
Previus behaviur when cfg->core_id != id of core with matching UUID is
maintained.
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com >
2019-05-09 23:39:18 +00:00
Michal Rakowski
94ef5a5249
Merge pull request #148 from mmichal10/fix-cleaner-stopping
...
Distinguish stopping cache from attached and detached states.
2019-05-09 14:42:17 +02:00
Michal Mielewczyk
676de5254f
Distinguish stopping cache from attached and detached states.
...
If stopping attached cache, cleaner should be stopped.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2019-05-09 08:21:36 -04:00
Michal Rakowski
78fea63178
Merge pull request #147 from robertbaldyga/fix-compilation-error-int-const-bool-context
...
Fix compilation error
2019-05-09 12:57:44 +02:00