Ian Levine
de32a9649a
Rename ocf_engine_cb to ocf_req_cb and move it from engine_common.h to ocf_request.h
...
Signed-off-by: Ian Levine <ian.levine@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-08-02 12:53:10 +02:00
Robert Baldyga
40ff7d2dcf
Merge pull request #799 from Open-CAS/cache_detach
...
Implement cache detach/attach
2024-07-31 06:54:08 +02:00
Robert Baldyga
88e39b5827
Merge pull request #801 from robertbaldyga/revert-complete-queue
...
Revert "cleaner: Remove complete_queue"
2024-07-30 14:03:20 +02:00
Robert Baldyga
218e9c5723
Revert "cleaner: Remove complete_queue"
...
This functionality is used by cleaning policies via cmpl_queue
to reschedule the completion, so that we avoid unlocking mutex in
the cleaner completion from interrupt context of IO completion.
This reverts commit 1e5eda68a7
.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-26 10:35:23 +02:00
Robert Baldyga
54679d7ff7
Merge pull request #797 from robertbaldyga/fixes-in-cleaner
...
Fixes in cleaner
2024-07-18 20:49:27 +02:00
Robert Baldyga
1e5eda68a7
cleaner: Remove complete_queue
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 17:38:17 +02:00
Robert Baldyga
db6b009ef5
cleaner: Simplify master request life cycle management
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 17:38:17 +02:00
Robert Baldyga
3300dbd4e7
cleaner: Rework request allocation
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 17:38:17 +02:00
Robert Baldyga
3248c85828
cleaner: Skip cleaner iteration if the map is empty
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 17:38:17 +02:00
Robert Baldyga
dfb2e1a8d5
cleaner: Check mapping after taking cache line lock
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 17:38:13 +02:00
Robert Baldyga
0a13bea889
cleaner: Skip filling the tail of the request map
...
Simply update req->core_line_count instead.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 13:23:35 +02:00
Robert Baldyga
2b94a3ab31
cleaner: Move sort functionality to flush_data abstraction
...
The flush_data is used by ocf_cleaner_do_flush_data_async(), which means
that callers of ocf_cleaner_fire() are now expected to guarantee that
entries are returned by getter in a sorted order. Currently the only case
when ocf_cleaner_fire() is called directly is for request cleaning, and
the request map is sorted by definition.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 13:23:35 +02:00
Robert Baldyga
dd4add45e1
lru: Use common flush_data abstraction for cleaning
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 13:23:35 +02:00
Robert Baldyga
43cc487c40
lru: Move partition runtime structures outside of metadata
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-12 13:23:29 +02:00
Michal Mielewczyk
83ec255458
Disable changing cache params for detached cache
...
Majority of management operations should be blocked for detached cache,
although adding and removing cores should be possible.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:19:37 +02:00
Michal Mielewczyk
f1bfd94c98
Enable IO to detached cache instance
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:18:44 +02:00
Michal Mielewczyk
de07458ff2
Common context for cache stop and cache detach
...
Stop and cache detach were already sharing contexts implicitly, which allowed
to reuse some functions in both pipelines. However, changing the context structs
could lead to not obvious bugs.
To prevent such errors both methods now share context structure explicitly
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:18:33 +02:00
Michal Mielewczyk
09335cd6f2
Update cache's state after detach
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:18:28 +02:00
Michal Mielewczyk
695d77e3b5
Apply cache state API
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:18:23 +02:00
Michal Mielewczyk
2f0b86f5ca
Extend cache state API
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:18:17 +02:00
Michal Mielewczyk
047e07c062
Rename cache "initializing" state to "detached"
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:18:04 +02:00
Michal Mielewczyk
d3c11a983b
Update cache state when stopping uninited instance
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-07-10 16:16:31 +02:00
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
dependabot[bot]
ddb8dcaee2
build(deps): bump tj-actions/changed-files in /.github/workflows
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 18.2 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](https://github.com/tj-actions/changed-files/compare/v18.2...v41 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 16:44:24 +00:00