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
d76adbb2a3
Merge pull request #140 from robertbaldyga/example-port-to-new-api
...
Fix example
2019-05-09 14:18:36 +02:00
Robert Baldyga
34a0aeb680
example: Add missing argument to volume_open() function
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-09 13:16:28 +02: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
Jan Musiał
8e4a1f10f0
Merge pull request #146 from robertbaldyga/init-core-pool-with-ctx
...
Initialize and deinitialize core pool with ctx
2019-05-09 12:41:00 +02:00
Robert Baldyga
0305fba4a3
Fix compilation error
...
Passing int constant directly to OCF_PL_NEXT_ON_SUCCESS_RET() macro caused
following compilation error (on GCC 7.4.0):
src/ocf/mngt/ocf_mngt_core.c:599:33: error: ?:
using integer constants in boolean context [-Werror=int-in-bool-context]
error ? -OCF_ERR_WRITE_CACHE : 0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
src/ocf/mngt/../utils/utils_pipeline.h:145:6: note:
in definition of macro ‘OCF_PL_NEXT_ON_SUCCESS_RET’
if (error) \
^~~~~
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-09 12:02:41 +02:00
Robert Baldyga
6c7df8abf6
Initialize and deinitialize core pool with ctx
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-09 11:22:06 +02:00
Jan Musiał
2d4fc035a6
Merge pull request #141 from robertbaldyga/readme-contributing-page
...
Update README.md
2019-05-08 14:25:19 +02:00
Robert Bałdyga
1c9fe96663
Merge pull request #133 from arutk/ajrutkow_async_counters
...
Extended reference counting
2019-05-08 14:23:50 +02:00
Robert Baldyga
2719799e99
example: Change ENV to OCF_ENV
...
Follow changes in OCF Makefile.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-08 12:44:56 +02:00
Robert Baldyga
6f0a203480
example: Adapt simple example to asynchronous API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-08 12:44:56 +02:00
Michał Wysoczański
8d09d7ae47
Merge pull request #145 from robertbaldyga/remove-interruption-arg-flush
...
Remove "interruption" argument from flush() functions
2019-05-08 12:02:06 +02:00
Adam Rutkowski
1e812b4eaf
Unit tests for reference counter utility
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-07 12:40:06 -04:00
Robert Baldyga
7b88aac56f
Remove "interruption" argument from flush() functions
...
As non-interruptible flushes are no longer triggered from OCF
internals, we can get rid of "interruption" argument and let
adapters handle it themselves.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-07 17:23:19 +02:00
Michal Rakowski
68dc62407b
Merge pull request #144 from robertbaldyga/bind-cache-lifetime-to-queue-lifetime
...
Get cache on queue creation and put it on queue destruction
2019-05-07 10:41:48 +02:00
Robert Baldyga
2a1161e384
Update README.md
...
Add information about "Contibuting" page
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-07 09:16:36 +02:00
Adam Rutkowski
c8e6b96ece
pyocf: remove put from cache stop to match get count
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Adam Rutkowski
2485584487
Remove obsolete ocf_cache_wait_for_io_finish from pyocf
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Adam Rutkowski
84f5454b29
Update unit tests to work with extedned ref counters
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Adam Rutkowski
aafc067fa5
Combine cache ref counter and valid flag into ocf_refcnt
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Adam Rutkowski
4251cc63e7
Do not send zero_line request if d2c
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Adam Rutkowski
af4b9b13d0
Freeze / unfreeze cleaning reference counters in detach/attach
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Adam Rutkowski
348b0f9ab8
Async wait for cleaner completion
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:49 -04:00
Adam Rutkowski
0e15c693fd
Return post modification value from ocf_refcnt_inc/dec
...
If counter is frozen then increment returns 0.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:23:11 -04:00
Adam Rutkowski
962f9d17d1
Remove functions to wait for cache pending requests
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:23:11 -04:00
Adam Rutkowski
92e9ae12f1
Wait for metadata requests in stop
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:23:11 -04:00
Adam Rutkowski
dc716d6a08
Use ref counter to track attach state
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:23:10 -04:00
Adam Rutkowski
979f51612f
Move dirty ref counter to cache->refcnt aggregate
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:22:29 -04:00
Adam Rutkowski
555f477248
Do not increment attached metadata counter on behalf of mngt requests
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:22:29 -04:00
Robert Baldyga
42b5cd1777
Get cache on queue creation and put it on queue destruction
...
This prevents situation when cache object is being destroyed
while some queues still exist.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-06 17:30:32 +02:00
Robert Bałdyga
1f62d4e7e5
Merge pull request #137 from arutk/pyocf-queue-put-fix
...
pyocf: fix management queue stop/put
2019-05-06 17:13:26 +02:00
Adam Rutkowski
9232bfcb72
Merge pull request #142 from robertbaldyga/pipeline-return-cleanup
...
Cleanup, fixes & improvements
2019-05-06 17:01:44 +02:00
Robert Baldyga
a82d420ee0
Add management queue guards where needed
...
Prevent starting management operations that require pipeline
when management queue isn't set.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-02 17:26:04 +02:00
Robert Baldyga
c2aea209db
Introduce pipeline *_RET macros
...
This simplifies code by allowing to express programmer intent
explicitly and helps to avoid missing return statements (this patch
fixes at least one bug related to this).
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-02 17:22:43 +02:00
Robert Baldyga
1373471af7
Introduce OCF_CMPL_RET() macro
...
This simplifies cases when we want to call completion callback
and immediately return from void-returning function, by allowing
to explicitly express programmers intent. That way we can avoid
cases when return statement is missing by mistake (this patch
fixes at least one bug related to this).
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-02 17:22:36 +02:00
Robert Baldyga
bcb2e670f3
metadata: Remove unnecessary check
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-02 17:22:28 +02:00
Adam Rutkowski
93c8932a17
pyocf: fix management queue stop/put
...
Queue is stopped when reference counter drops to 0, so no need to
manually stop management queue after cache stop - simple put is
enough.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-25 13:21:25 -04:00
Michał Wysoczański
bb6fe41b9d
Merge pull request #136 from arutk/unplug_error_handling
...
Refactor cache mngt stop/detach for better error handling
2019-04-23 15:33:16 +02:00
Adam Rutkowski
26579e53cd
Refactor cache mngt stop/detach for better error handling
...
_ocf_mngt_cache_unplug context is now provided by the caller.
This way _ocf_mngt_cache_unplug returns only non-critical (cache write)
errors, allowing stop/detach operation to always proceed and optionally
finish with error. This eliminates the need for rolling back previous
stop/detach operations, which might turn out to be impossible e.g.
under memory pressure.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-23 16:16:18 -04:00
Katarzyna Łapińska
bf879c4b09
Merge pull request #113 from Deixx/tests_start_stop
...
pyocf tests for start/stop
2019-04-23 12:10:17 +02:00
Michał Wysoczański
190812e84a
Merge pull request #135 from arutk/rename_env_ocf_env
...
Rename makefile ENV* variables to OCF_ENV*
2019-04-23 11:22:39 +02:00
Adam Rutkowski
e11edcacd8
Rename makefile ENV* variables to OCF_ENV*
...
'ENV' variable is set and used by OS utilities on some Linux
distros, interfering with OCF build system. Renaming ENV and
other ENV* variables to OCF_ENV* to avoid conflicts.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-20 16:54:04 +02:00
Michał Wysoczański
4f2efb0ae7
Merge pull request #134 from Donaim/fix-scanbuild
...
Fix immediate reassign
2019-04-19 15:30:58 +02:00
Vitaliy Mysak
bf2242fade
Fix immediate reassign
...
Don't reassign value of cache without any previus use.
It produced warnings when analyzing with scanbuild.
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
2019-04-19 09:25:23 -04:00
Adam Rutkowski
c7df9161be
Use secure alloc in _raw_dynamic_get_item
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-18 23:11:12 -04:00
Michal Rakowski
9f927de841
Merge pull request #132 from arutk/secure_alloc_dynamic
...
Use secure alloc in _raw_dynamic_get_item
2019-04-18 21:17:03 +02:00
Daniel Madej
1aa5e99173
Pyocf tests for start/stop
...
Tests for starting cache and checking if mode works properly
Tests for stopping cache
Negative and stress tests
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-04-18 17:00:14 +02:00
Michał Mielewczyk
d3bfbf6200
Merge pull request #130 from micrakow/kw-fix-ww16_19
...
Added missing return in metadata_probe_cores
2019-04-18 16:40:36 +02:00
Michal Rakowski
3d6b3ea2e8
Added missing return in metadata_probe_cores
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-04-18 16:35:05 +02:00