Commit Graph

294 Commits

Author SHA1 Message Date
Robert Bałdyga
c500f90676
Merge pull request #155 from KamilLepek/unit_tests_output
Save unit tests output to file
2019-05-16 10:33:28 +02:00
Kamil Lepek
382c31a8e0 Save unit tests output to file
Seperate output of different script stages

Signed-off-by: Kamil Lepek <kamil.lepek94@gmail.com>
2019-05-16 10:26:02 +02:00
Michał Wysoczański
df0fbc3ce5
Merge pull request #154 from robertbaldyga/set-queue-for-metadata-io
Set queue for metadata io submitted to cache volume
2019-05-15 00:14:32 +02:00
Robert Baldyga
f5463d9a16 Set queue for metadata io submitted to cache volume
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-14 14:15:47 +02:00
Jan Musiał
a9d07917a1
Merge pull request #153 from robertbaldyga/put-io-before-callback
metadata: Put io before callback invocation
2019-05-14 13:53:33 +02:00
Robert Baldyga
c263e3e9eb metadata: Put io before callback invocation
This allows for safe volume destruction in callback function.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-13 12:12:37 +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
Michał Wysoczański
547cd7fe04
Merge pull request #150 from robertbaldyga/dont-print-uuid-as-a-string
Stop treating UUID as ANSI string
2019-05-10 12:58:26 +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
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