Commit Graph

578 Commits

Author SHA1 Message Date
Michal Mielewczyk
7af5d296e1 New error code for interrupted waiting.
This commit is part of patch that will allow to interrupt waiting for OCF
operation.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
f7d88c4b3f Don't allow core add, remove nor detach interruptions
They are usually not time comsuming operations, so risk of hung task is low.
So it's easier to temporarily disable interrupts instead of properly handle
async completion.

This commit is part of patch that will handle interrupt of waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
2ac8214379 Don't allow probe interruption.
Usually metadata probe is non time consuming. To avoid dealing with
synchronization problems, noninterruptible wait is performed.

This commit is part of patch that will handle interrupt of waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
d483951ebe Free thread memory after it is stopped.
After marking thread as ready to stop, CAS was waiting this for thread to exit
out of main execution loop (in _cas_io_queue_thread()). In case of management
queue it lead to deadlock because both stoping queue and main execution loop was
performed in the same execution context.

Since freeing memory is the only operation after stopping thread, it can be
moved just after the main thread loop. After this little reordering,
synchronising between _cas_stop_thread() and _cas_io_queue_thread() in no longer
needed, and no deadlock will occur.

This change is needed to put management qeueue from completion context. Without
this cachnge, there will be no possiblitiy to stop cache from completion context
and to make rollback.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
Michal Mielewczyk
3eda503095 Additional null check when starting cache instance
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
Michal Mielewczyk
49c87c9527 Fix legacy error messages.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
Daniel Madej
0d663a37f1
Merge pull request #230 from Ostrokrzew/init2
Cache configuration load - every mode - 1 cache 1 or 4 cores
2020-01-02 13:03:46 +01:00
Jan Musial
cefd12edc5 utils: lengthen settle timeout in open-cas service
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-01-02 09:35:33 +01:00
Ostrokrzew
e2ad1a47f3 Add initialize tests
Verify that cache loading works properly with extra params - every mode - 1 cache and 1 or 4 cores.
Verify that cache loading works properly with no extra params - every mode - 1 cache and 1 or 4 cores.
Verify that cache loading works properly with different extra params - every mode - 1 cache and 1 or 4 cores.

Signed-off-by: Ostrokrzew <ostrokrzew@protonmail.com>
2020-01-02 08:58:06 +01:00
Robert Baldyga
8676dd2384
Merge pull request #197 from Ostrokrzew/last
Add fault injection tests and update stress tests file
2019-12-30 18:58:23 +01:00
Daniel Madej
b1bd3578db
Merge pull request #223 from mariuszbarczak/introducing-new-io-class-caching-rule-file-name-prefix
Introducing a new IO class caching rule - file name prefix
2019-12-30 10:57:47 +01:00
Robert Baldyga
7f86961447 tests: Add test for classification by file name prefix
Signed-off-by: Mariusz Barczak <mariusz.barczak@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-12-27 14:09:15 +01:00
Mariusz Barczak
7facb1e926 Introducing a new IO class caching rule - file name prefix
Signed-off-by: Mariusz Barczak <mariusz.barczak@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-12-27 14:08:32 +01:00
Robert Baldyga
9286c0eae7
Merge pull request #168 from Deixx/effective-ioclass
Test for determining effective io class
2019-12-27 12:24:35 +01:00
Adam Rutkowski
d836a054a7
Merge pull request #249 from micrakow/atomic_fix
atomic: move setting up context before sub io allocation
2019-12-23 17:48:19 +01:00
Daniel Madej
02e19e466c Test for determining effective io class
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-12-23 13:51:09 +01:00
Slawomir_Jankowski
40c91426ba Add fault injection tests
Try load cache with core device already mounted.
OpenCAS prevents stop when partition is mounted.
Check if used in one CAS instance core device can be added to second CAS instance.

Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-12-23 12:00:38 +01:00
Slawomir_Jankowski
4c77a7a4ff Test update
Update test after separating functions from this test to other files.
Add 'dut_config' to .gitignore.

Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-12-23 12:00:38 +01:00
Sławomir Jankowski
8356174d80
Merge pull request #236 from rafalste/tests_cache_mode_switching
Add tests for dynamic cache mode switching
2019-12-23 11:59:49 +01:00
Ostrokrzew
b6028a8787 Minor fixes in CAS API
Add casting to int in few cleaning policy params.
Fix few typos.
Add equation overload in cleaning policy params' classes.

Signed-off-by: Ostrokrzew <ostrokrzew@protonmail.com>
2019-12-23 11:47:13 +01:00
Michal Rakowski
33ad073dfd atomic: use proper step_size in sub io allocation
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-12-23 11:11:08 +01:00
Rafal Stefanowski
d0f19af99a Add tests for dynamic cache mode switching
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-12-20 16:38:10 +01:00
Jan Musiał
662129aa40
Merge pull request #226 from katlapinka/incremental-load-tests
Add incremental load tests
2019-12-20 13:30:55 +01:00
Katarzyna Łapińska
e6135fcd5e
Merge pull request #234 from katlapinka/corepool-tests
Add incremental load tests with core pool
2019-12-20 11:01:09 +01:00
Katarzyna Lapinska
844411864f Add incremental load tests with core pool 2019-12-20 10:13:25 +01:00
Michal Rakowski
135863e744
Merge pull request #235 from katlapinka/add-detached-core
Enable try-add method in CAS test-framework API
2019-12-20 09:54:03 +01:00
Michal Rakowski
a62458808d
Merge pull request #247 from robertbaldyga/ocf-fix-null-ptr-def-in-cleaner
Update OCF: Fix NULL pointer dereference in cleaner
2019-12-19 18:08:12 +01:00
Robert Baldyga
6a1d31cc04 Update OCF: Fix NULL pointer dereference in cleaner
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-12-19 17:05:31 +01:00
Katarzyna Lapinska
3ebf3fb913 Add incremental load tests 2019-12-19 14:24:19 +01:00
Sławomir Jankowski
719b2766fd
Merge pull request #245 from robertbaldyga/ocf-fix-cleaner-race-condition
Update OCF: Fix cleaner race condition
2019-12-19 12:53:13 +01:00
Michal Rakowski
b755bb9121
Merge pull request #246 from katlapinka/prepare-fix
Small prepare fixes: remove dm devices and move setting default init config
2019-12-19 12:50:49 +01:00
Daniel Madej
c51866989f
Merge pull request #224 from katlapinka/cli-msg-validate
Add API to validate CAS CLI messages
2019-12-19 12:32:09 +01:00
Daniel Madej
13dc5b402d
Merge pull request #215 from micrakow/seq_cutoff_tests
Add functional tests for sequential cut-off
2019-12-19 12:30:22 +01:00
Katarzyna Lapinska
24d9bc9448 Small prepare fixes: remove dm devices and move setting default init config 2019-12-19 11:55:03 +01:00
Robert Baldyga
6846de28a2 Update OCF: Fix cleaner race condition
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-12-19 11:53:49 +01:00
Michal Rakowski
2f26307ee7 Add functional tests for sequential cut-off
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-12-19 11:49:05 +01:00
rafalste
a9a6134583
Merge pull request #217 from imjfckm/insert_errors_test
Insert errors test
2019-12-19 11:13:58 +01:00
Katarzyna Lapinska
ad90a69284 Enable try-add method in CAS test-framework API 2019-12-19 07:55:06 +01:00
Jan Musial
3ab388e9fe Add test for errors on cache inserts
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-12-18 16:35:54 +01:00
Jan Musial
d9074c1950 Add cleanup of DM in conftest
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-12-18 16:35:54 +01:00
Jan Musial
62d7c96957 Fixes for CLI tests
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-12-18 16:35:54 +01:00
Jan Musial
3908ab261b Minor fixes in CAS API
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-12-18 15:02:52 +01:00
Daniel Madej
9cabf06ed4
Merge pull request #242 from rafalste/fix_api_minor_issues
Fix minor issues in API
2019-12-18 14:15:09 +01:00
Rafal Stefanowski
b6d9892499 Add string representation for cleaning policy
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-12-18 10:17:27 +01:00
Rafal Stefanowski
a9f74d43a2 Fix Time class output
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-12-18 10:17:06 +01:00
Rafal Stefanowski
b1c90bf574 Fix typo in casadm_parser.py
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-12-18 10:16:27 +01:00
Jan Musiał
743de9a438
Merge pull request #225 from katlapinka/cas-api-plug-and-cache-params
Adapt CAS API to handle disk plugging and fix for setting clean…
2019-12-18 09:01:45 +01:00
Katarzyna Lapinska
bc9fb51482 Add API to validate CAS CLI messages 2019-12-18 09:00:37 +01:00
Michal Rakowski
40eaa3bd78
Merge pull request #240 from mmichal10/fix-staring-cache
Fix starting cache on devices bigger than 5GB
2019-12-17 16:47:01 +01:00
Michal Mielewczyk
447f754a63 Fix starting cache on devices bigger than 5GB
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-12-17 10:36:23 -05:00