Commit Graph

1693 Commits

Author SHA1 Message Date
Michal Mielewczyk
f8a0f88892 Test detaching cache twice
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:16:18 +02:00
Michal Mielewczyk
c95f396ba9 Test for attaching cache twice
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:15:34 +02:00
Michal Mielewczyk
58fddd3602 Test add and remove core with cache detached
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:15:18 +02:00
Michal Mielewczyk
3f41a35f30 Patch detached cache API
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:14:33 +02:00
Michal Mielewczyk
06a2125ba9 pytest: update random.seed() argument
From python3.11 the function accepts only NoneType, int, float, str, bytes, or
bytearray

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:14:30 +02:00
Michal Mielewczyk
e557fd4f64 Fix comment
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:13:45 +02:00
Michal Mielewczyk
41224c61c0 Track max number of cores for atomic volume
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:13:15 +02:00
Michal Mielewczyk
2a97de8792 Detach finish: destroy stop pipeline before cmpl
'stop_pipeline' filed may be reused during cache lifetime (e.g. when cache is
detached and attached again - the pipeline would be freed and then
re-allocated). Calling completion after detach before freeing the pipeline may
lead to race condition.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 11:35:42 +02:00
Robert Baldyga
283a897eeb
Merge pull request #798 from robertbaldyga/mode-to-req-mode-conversions
Add missing ocf_cache_mode_t to ocf_req_cache_mode_t conversions
2024-07-08 09:12:01 +02:00
Robert Baldyga
d7fe7c05f1 Add missing ocf_cache_mode_t to ocf_req_cache_mode_t conversions
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-05 16:59:05 +02:00
Robert Baldyga
ff0551b616
Merge pull request #796 from Open-CAS/fix_env_memset
Fix env memory zeroing
2024-06-13 17:35:58 +02:00
Rafal Stefanowski
5975bb8822 Fix env memory zeroing
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-06-13 11:51:00 +02:00
Robert Baldyga
7c8ac29ab9
Merge pull request #793 from robertbaldyga/kernel-6.8
Minor fixes to clean compile with newer Linux kernels
2024-05-14 08:11:30 +02:00
Robert Baldyga
168ecd0075 Add missing "static" to the local function
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:59:39 +02:00
Robert Baldyga
578f4b6591 Add missing headers
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:51:29 +02:00
Robert Baldyga
43608fc812 Remove unused function
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:50:34 +02:00
Robert Baldyga
253734b160 Move misplaced function declaration to the appropriate header
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:49:52 +02:00
Robert Baldyga
dc3b581e38 Move declaration to the right header
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:49:21 +02:00
Robert Baldyga
527e3deb74 Remove accidentally added .swp file
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:35:59 +02:00
Robert Baldyga
4177454ae7
Merge pull request #792 from robertbaldyga/fix-compilation
Fix compilation
2024-04-01 20:58:03 +02:00
Robert Baldyga
5710ca8b4a Fix compilation
Signed-off-by: Robert Baldyga <robert.baldyga@open-cas.com>
2024-04-01 18:27:25 +00:00
Robert Baldyga
f39a57a974
Merge pull request #789 from robertbaldyga/fix-ocf_alock_waitlist
Fix wrong order call to ocf_alock_waitlist_remove_entry()
2024-03-22 10:33:46 +01:00
Amir Haroush
c85a01473f Fix wrong order call to ocf_alock_waitlist_remove_entry()
Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-03-21 21:20:11 +01:00
Robert Baldyga
cf5767dcb7
Merge pull request #786 from robertbaldyga/cleaner-unlock-mngt-fix
cleaner: Unlock cache mngt lock from queue context
2024-03-21 19:11:07 +01:00
Robert Baldyga
2398412622 cleaner: Unlock cache mngt lock from queue context
Cache mngt lock cannot be unlocked from io completion context (which is
potentially atomic context) as it may involve sleeping operations.
Modify cleaner utility to support rescheduling to queue context before
calling the completion. Update cleaning policies to use that option.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-03-21 15:25:18 +01:00
Robert Baldyga
7e52cfafb9
Merge pull request #783 from robertbaldyga/fix-deadlock-in-discard
Fix potential deadlock in discard
2024-03-21 08:53:39 +01:00
Robert Baldyga
fd489e3a30 Fix potential deadlock in discard
HB lock takes inclusive metadata lock, which is taken also by metadata
flush, thus trying to call metadata flush under HB lock attempts to take
this lock recursively. In that case, if in the meantime some other thread
would try to take exclusive metadata lock, the inner inclusive lock would
block (because the lock keeps the order), with outer inclusive lock still
held, leading to a deadlock.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-03-20 23:35:46 +01:00
Robert Baldyga
a7a62cb44a
Merge pull request #779 from robertbaldyga/posix-env_bit_test-fix
env: posix: Make env_bit_test() atomic
2023-09-21 13:55:32 +02:00
Robert Baldyga
5522d19718 env: posix: Make env_bit_test() atomic
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
2023-09-20 16:52:07 +02:00
Robert Baldyga
37bae0ec47
Merge pull request #777 from robertbaldyga/fix-req-unlock-pt
Unlock request in PT using ocf_req_unlock()
2023-09-14 09:10:26 +02:00
Robert Baldyga
d57c9bb51d Unlock request in PT using ocf_req_unlock()
There are situations when we can end up in engine_pt with cache lines
locked for write. One example is engine_rd falling back to engine_pt after
failure during cache line preparation, where write lock has been already
taken. To handle this situation properly, unlock request using more general
unlock function.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2023-09-13 17:04:06 +02:00
Robert Baldyga
016d7a8ee2
Merge pull request #776 from robertbaldyga/update-maintainers-email
Update maintainer's email address
2023-05-11 10:11:57 +02:00
Robert Baldyga
0d45ac0674 Update maintainer's email address
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2023-05-10 14:53:47 +02:00
Robert Baldyga
80289f1d2f
Merge pull request #775 from robertbaldyga/remove-intel-support
Remove information suggesting Intel support
2023-04-26 11:04:06 +02:00
Robert Baldyga
b9a5baa347 Remove information suggesting Intel support
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-04-26 09:37:55 +02:00
Robert Baldyga
e09463054d
Merge pull request #771 from robertbaldyga/cache-is-initializing
Add OCF API ocf_cache_is_initializing
2023-04-17 20:38:14 +02:00
Robert Baldyga
f3878a86e1
Merge pull request #770 from robertbaldyga/fix-priv-alignment
Fix alignment of private data in parallelize & pipeline
2023-04-17 20:37:56 +02:00
Robert Baldyga
83477bdcf9
Merge pull request #769 from robertbaldyga/pyocf-fix-random-string
tests: Use proper random object for string generation
2023-04-17 20:37:38 +02:00
Amir Haroush
041df202b8 Fix alignment of private data in parallelize & pipeline
there is an issue when someone call to parallelize/pipeline
with some struct that is aligned (say to 64B)
but these APIs add their own data, right before
the user's private data.
so, the user's data is no longer aligned
which might cause segfault in some cases.

Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-04-17 20:35:38 +02:00
Amir Haroush
6cb1ff71c2 Add OCF API ocf_cache_is_initializing
Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-03-30 10:34:05 +02:00
Robert Baldyga
2560aa709c tests: Use proper random object for string generation
PyOCF needs to control random seed, to allow running tests with
pytest-xdist. Use local random object initialized with seed
from the config.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-03-30 10:30:55 +02:00
Robert Baldyga
64a46a78cb
Merge pull request #767 from robertbaldyga/fix-segfault
Fix segfault when copy unaligned struct as aligned
2023-03-28 10:09:28 +02:00
Amir Haroush
22a697d09e Fix segfault when copy unaligned struct as aligned
Because context has one field which is aligned to 64B
(struct ocf_volume cache_volume) the compiler use vmovdqa (aligned)
instead of vmovdqu (unaligned) in reality the address is not 64 aligned,
it ends with 0x8, so we get this segfault.

Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-03-28 09:32:33 +02:00
Robert Baldyga
a05a49a886
Merge pull request #766 from Svelar/master
utils_refcnt_register_zero_cb.c: fix typos
2023-01-23 08:36:31 +01:00
Svelar
3fe63b3036 tests/unit/tests/utils/utils_refcnt.c/utils_refcnt_register_zero_cb.c: fix typos
Signed-off-by: Svelar <sunrongqi@huawei.com>
2023-01-04 16:01:29 +08:00
Robert Baldyga
c6071bbbb4
Merge pull request #760 from robertbaldyga/license-check-on-relase-branches
Enable "Licence-date-verification" check on release branches
2022-11-22 20:25:00 +01:00
Robert Baldyga
d0bfa94853
Merge pull request #761 from DocentSzachista/remove-ocf-io-start
remove ocf_io_start function
2022-10-31 12:22:19 +01:00
Damian Raczkowski
d2ea41cdbc remove ocf_io_start function
Signed-off-by: Damian Raczkowski <damian.raczkowski@intel.com>
2022-10-28 15:03:36 +02:00
Robert Baldyga
f69b91ae25 Enable "Licence-date-verification" check on release branches
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-10-17 12:31:37 +02:00
Robert Baldyga
43894dd4a5
Merge pull request #759 from live4thee/add-copyright-line
update copyright line as per requested
2022-10-10 13:52:01 +02:00