Commit Graph

2230 Commits

Author SHA1 Message Date
Michal Mielewczyk
72026cea63 Add missing ocf_volume_destroy() on cache init
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 15:08:37 +02:00
Michal Mielewczyk
6a409a0064 Set mngt queue to null if couldn't start thread
This prevents attempt to deinitialize the queue for the second time in
the start rollback

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 15:08:37 +02:00
Michal Mielewczyk
72594436ce Don't access cache priv before locking cache
Cache priv may be freed by concurrent stop.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 15:08:37 +02:00
Michal Mielewczyk
79a73fded2 ctx: Remove unused zalloc ops
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 15:08:37 +02:00
Ian Levine
c9f301249e Check memory parameters before copying to user space
Signed-off-by: Ian Levine <ian.levine@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 15:08:16 +02:00
Amir Haroush
14aea0eda0 Fix compilation distclean race where several tries to rm
If we run 'make -j' all 3 targets [modules, casadm, utils] will run in parallel.
modules & casadm will then call sync, and then call distcleandir from
ocf/Makefile. The distcleandir will try to remove empty directories, but now we
have two instances of make trying to do that. Also, what if one of them just
created directory to put files in it, and the other just removes it.
Make casadm target dependent on modules target will ensure that it will start
running only after modules target is done.

Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Avi Halaf
1a1d9507af Fix get-param casadm man page
Signed-off-by: Avi Halaf <avi.halaf@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Amir Haroush
b02c02f1bb Makefile: fix dependencies for casadm
Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Michael Lyulko
ef22115539 Change compiler flags from -O2 to -Ofast
Signed-off-by: Michael Lyulko <michael.lyulko@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Toby Roth
988ac5f645 Do not submit IO in complete flush
Signed-off-by: Toby Roth <toby.roth@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Jan Musial
ab81ac667b Remove unused fields
Signed-off-by: Jan Musial <jan.musial@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Gal Hammer
b9110635c1 cas_cache: fix "blk_update_request: operation not supported" error
A write request with the REQ_RAHEAD flag enabled cause the nvme driver
to send a write command with access frequency value that is reserved
(at least on specification version 1.4c). NVME devices might fail this
write command with an unsupported error. So we now clear the request's
flag based on its direction.

Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Robert Baldyga
de16763bec
Merge pull request #1496 from Kamoppl/kamilg/update_tests
tests: update tests
2024-09-10 14:35:18 +02:00
Robert Baldyga
45c37edd39
Merge pull request #1513 from mmichal10/update-readme
README: Update the latest version to 22.6.3
2024-09-10 12:09:35 +02:00
Michal Mielewczyk
fb239ccd7d README: Update the latest version to 22.6.3
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-10 12:07:36 +02:00
Katarzyna Treder
b15076a22e Fuzzy tests for casadm 'print statistics' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
e8fbc624ed Fuzzy tests for casadm 'set param' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
4efdf36f45 Fuzzy tests for casadm 'load io class' command and for io class config
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
b8364ea593 Fuzzy tests for casadm 'get param' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
1861758c6a Fuzzy tests for casadm 'flush' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
7f843fd6bf Fuzzy tests for casadm 'set cache mode' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
aeb0321393 Fuzzy tests for casadm 'stop' and 'remove' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
fd7cf1ad7d Fuzzy tests for casadm 'start cache' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
f4bfd5398e Fuzzy tests for casadm 'io class list' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
981946de7d Fuzzy tests for casadm 'add core' command
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
8156abdd12 Add missing peach fuzzer config files
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
619a6c8e2a Refactor common fuzzy files
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
2024-09-10 12:01:27 +02:00
Katarzyna Treder
d324f541a1
Merge pull request #1488 from Kamoppl/kamilg/update_cas_api
test-api: Update cas api
2024-09-10 11:59:03 +02:00
Kamil Gierszewski
df3c759de8
test-conftest: fix git
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
2024-09-10 10:39:08 +02:00
Kamil Gierszewski
36903a2c67
test-api: update cas api after reformat
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
2024-09-10 10:39:08 +02:00
Kamil Gierszewski
d40e2a519d
test-api: reformat api files
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
2024-09-10 10:39:07 +02:00
Kamil Gierszewski
077820f1c0
test-conftest: remove autoinstall and update conftest
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
2024-09-10 10:24:38 +02:00
Kamil Gierszewski
61371a1efc
test-api: update requirements
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
2024-09-10 10:24:38 +02:00
Kamil Gierszewski
d48e9fc80d
test-api: update cas api
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
2024-09-10 10:24:38 +02:00
Robert Baldyga
5dccbc3978
Merge pull request #1507 from rafalste/cache_detach
Implement cache detach/attach
2024-09-09 16:38:20 +02:00
Michal Mielewczyk
16690e1eab Enable cache detach
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Jan Musial <jan.musial@huawei.com>
2024-09-09 16:30:05 +02:00
Michal Mielewczyk
af8c75b20a Enable cache attach
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:29:21 +02:00
Michal Mielewczyk
b480bbaf47 casadm: cache start refactor
Cache start and cache attach will share the same code in casadm; the following
refactor is supposed to facilitate reusing the existing code in next commits

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:27:20 +02:00
Michal Mielewczyk
12e7c8339a casadm: code cleanup and cache_stop() refactor
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:27:08 +02:00
Michal Mielewczyk
9f5a9f0d62 casadm: '-' instead of dev path for detached cache
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
6a1187a8b3 casadm: list cores of detached cache
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
fc35684910 casadm: skip printing strings of len 0
An attempt to print a string of zero length was crashing casadm.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
8724c29413 Disable changing cache params for detached cache
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
bb8fc64ed5 Enable adding core to detached cache instance
Instead of trying to access properties of potenially unavaliable cache device
use properties saved in cache priv

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
cef13315d0 Compare properties of a new cache device during cache attach
New cache device must have all the same properties then the previously
attached one.
Keeping cache properties in cache priv also allows to add new cores to
detached cache instance.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
e0ef8c1b8d New error codes
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
853e8f9357 configure: refactor cas_copy_queue_limits()
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
33721e7c92 Set NOMERGES flag for cache volume
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 15:57:30 +02:00
Robert Baldyga
20276bd9c1
Merge pull request #1509 from robertbaldyga/remove-ocf_queue_get_cache
Remove ocf_queue_get_cache()
2024-09-09 14:56:29 +02:00
Robert Baldyga
08e9f1a323 Remove ocf_queue_get_cache()
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-09 14:48:44 +02:00