Commit Graph

313 Commits

Author SHA1 Message Date
Robert Baldyga
63bab9584c Redesign failover standby management
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-05 16:17:52 +01:00
Robert Baldyga
b0a3c9cd45
Merge pull request #982 from robertbaldyga/remove-redundant-io-get-put
Remove redundant ocf_io_get()/ocf_io_put() from bottom volume
2021-12-27 15:21:32 +01:00
Adam Rutkowski
0f6a024025 Make device parameter obligatory in failover activate
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-12-01 00:58:09 +01:00
Robert Baldyga
990f55d250 Fix error mapping
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-26 09:29:37 +01:00
Robert Baldyga
d28881588d Map OCF error codes to errno in io path
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-25 17:11:07 +01:00
Robert Baldyga
57a3938872 Improve error mapping code
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-25 17:11:07 +01:00
Robert Baldyga
73461fc26d Add missing error mappings
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-25 16:27:08 +01:00
Robert Baldyga
6743c02033 Return kernel error codes on I/O path
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-22 14:35:24 +01:00
Robert Baldyga
b189a7147e Update OCF - dynamic metadata update in standby mode
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-19 17:02:32 +01:00
Rafal Stefanowski
2097f8029b Set promote_on_threshold sequential cutoff flag
Due to linux thread scheduling nature, we prefer to promote streams
as early as we reasonably can. One way to achieve that is to set
promotion count really low, which unfortunately significantly increases
number of accesses to shared structures. The other way is to promote
streams which reach cutoff threshold, as we can reasonably assume that
they are likely be continued after thread is rescheduled to another CPU.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-11-09 13:41:49 +01:00
Robert Baldyga
f909b21276 Remove redundant ocf_io_get()/ocf_io_put() from bottom volume
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-05 12:49:44 +01:00
Robert Baldyga
5431f83273
Merge pull request #962 from Open-CAS/passive_api
Passive state - API changes
2021-11-03 10:11:08 +01:00
Krzysztof Majzerowicz-Jaszcz
3185564869 Standby state API changes
Don't print statistics for a cache in passive state
Passive cache - casadm set/get cache param disabled in passive state
Obsolete "cache_get_param" function removed
Error in layer_cache_management.c fixed
Flushing cache/core disabled with error for passive mode
Core addition disabled in passive mode
IO class setting disabled for passive mode
Counters reset disabled for passive mode
Ioctl handling changes to reflect OCF API changes

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2021-10-29 12:34:33 +02:00
Rafal Stefanowski
acec05060d Fix license
Change license to BSD-3-Clause

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-28 12:46:42 +02:00
Adam Rutkowski
90d8584bd7 failover detach
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-10-08 15:20:52 +02:00
Robert Baldyga
6792c1b455
Merge pull request #930 from robertbaldyga/cache-passive-state
Add cache passive state
2021-09-10 13:09:23 +02:00
Robert Baldyga
f8e39fa104 Introduce activate operation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:59 +02:00
Robert Baldyga
17aa424319 Introduce cache bind operation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:54 +02:00
Robert Baldyga
c0110a4d01 Introduce cache exported object
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-09 22:34:56 +02:00
Robert Baldyga
81108f74b7
Merge pull request #927 from jfckm/use-plugging-in-bottom-adapter
Use blk_plug mechanism in bottom block adapter
2021-09-02 11:23:37 +02:00
Robert Baldyga
1dd8f12242 Rework exported object management functions
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-25 15:38:22 +02:00
Robert Baldyga
feb7134e34
Merge pull request #924 from jfckm/add_mq_blocking_config
Add config for BLK_MQ_F_BLOCKING flag
2021-08-20 10:21:11 +02:00
Robert Baldyga
a413e676e9
Merge pull request #925 from mmichal10/env-refactor
Env refactor
2021-08-20 10:20:17 +02:00
Jan Musial
6c6bc95b29 Use blk_plug mechanism in bottom block adapter
This is a suboptimal solution to CAS on top of MD RAID1 device. If using
only submit_bio API RAID1 would process all IOs in single thread.
Plugging bypasses this thread and processess IOs in blk_finish_plug
caller context improving performance drastically.

Testing showed no negative impact to other usecases and it's a thing
that Linux does in AIO, so it's vetted and proven to work.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2021-08-18 11:42:37 +02:00
Robert Baldyga
1064cecbb9
Merge pull request #921 from mmichal10/remove-atomics
Remove remains of atomic writes support
2021-08-18 09:19:53 +02:00
Jan Musial
ac00bd503a Add config for BLK_MQ_F_BLOCKING flag
Signed-off-by: Jan Musial <jan.musial@intel.com>
2021-08-18 09:04:15 +02:00
Michal Mielewczyk
5e4fcb62be env: refactor rwmutex
All the operations on `count` are performed under the lock thus it doesn't need
to be atomic.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-17 15:52:25 +02:00
Michal Mielewczyk
39bab9ad87 env: simplify env_rwsem
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-17 15:52:25 +02:00
Michal Mielewczyk
c68de77799 Remove remains of atomic writes support
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-16 16:01:21 +02:00
Robert Baldyga
3983cea2b5 Fix cache_priv deallocation
Since cache_priv is allocated with vmalloc() it should be deallocated
with vfree().

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-16 05:16:15 +02:00
Robert Baldyga
c968285d9f Remove upgrade-in-flight feature
Due to changes in Linux kernel this feature is not working anymore.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-11 20:33:16 +02:00
Michal Mielewczyk
a6d3c70b1d Async API for switching cleaning policy
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-27 16:15:09 +02:00
Robert Baldyga
2e4c460702 Use cache line size as discard granularity
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-15 22:47:08 +02:00
Robert Baldyga
2a35bd09be Introduce lazy helper thread abstraction to avoid hung task
Some helper threads are created at the very beginning of cache start/stop
operations, but they are used only after OCF start/stop finishes, which
may take significant amount of time. Kernel by default creates threads
that wait for the first wake up in uninterruptible state, which may trigger
hung task warning if the first wake up is called more than 120 seconds
after thread creation. To mitigate this problem we create lazy thread
abstraction that waits for a wake up in interruptible state.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-13 10:07:25 +02:00
Robert Baldyga
517d98a6ed Split big IO requests
OCF cannot allocate request map bigger than 4MiB (due to kmalloc
limitations), thus we need to split bigger IOs into series smaller
ones to reduce request map size.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-07 18:52:22 +02:00
Robert Baldyga
34dbbc056d Fix exported object deinitialization
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-24 14:24:04 +02:00
Kozlowski Mateusz
62f4c61f8e Update mpool API for vol_atomic_dev_bottom
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-06-23 14:57:21 +02:00
Adam Rutkowski
7aa883dbd3 OCF update (removed configurable eviction policy)
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 22:56:51 +02:00
Kozlowski Mateusz
647124895f Update OCF
Remove metadata updater
Update mpool API

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-06-21 21:57:10 +02:00
Robert Baldyga
e5e0697da4 Add support for kernel 5.11
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
2d7b94fa21 Remove block_dev_start_bio()
Now submit_bio path has no fallback to request queue, so we can simplify
io accounting.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
62eb6dc3fd Remove unused functions from top volume
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
5e17d0833f Remove unused callbacks from cas_disk ops
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
7f89e59b1a Remove CAS_FLUSH_SUPPORTED
It's defined on every single supported kernel, so there is actually no need
for this define at all.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
b82b338c53 Remove blk request handling path
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
7343cb55fa Handle all io on bio handler
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 16:52:35 +02:00
Robert Baldyga
fbc3906576 Replace removed kernel API function with new one
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-05-26 23:35:30 +02:00
Slawomir Jankowski
964877ddd6 Typo fix
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-05-13 17:02:05 +02:00
Slawomir Jankowski
9e7f163216 Cleanup exported object queue
This patch fixes adding core after core addition failure.
The queue wasn't cleaned before and following core addition cannot
re-initialize queue properly.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-05-13 17:01:41 +02:00
Robert Baldyga
a226b39c4e
Merge pull request #811 from mmichal10/fix-discard
Fix max discard size
2021-05-10 15:36:37 +02:00