Adam Rutkowski
ed5185e870
pyocf: make io class config more usable
...
Unify field param names and include io class id in info struct.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 17:35:33 +01:00
Adam Rutkowski
5fe217d96f
pyocf: set proper OCF error codes in Volume
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 17:35:33 +01:00
Adam Rutkowski
c43059a4cf
pyocf: add get_bytes() function to Volume and Data
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 17:35:33 +01:00
Adam Rutkowski
683174c78f
pyocf: add option to load cache without openning cores
...
... this is useful to workaround current pyocf limitations and
load cache with manual core insertion
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 17:35:33 +01:00
Adam Rutkowski
58dac85f7b
pyocf: add ocf_core_get_uuid() wrapper
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 17:35:29 +01:00
Adam Rutkowski
c7144decf8
pyocf: extend error volume capabilities
...
Adding option to
1. inject error based on I/O number
2. arm/disarm error injection for easier testing
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 16:40:54 +01:00
Adam Rutkowski
cf72664c2c
pyocf: fix cache device config
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-13 16:40:54 +01:00
Robert Baldyga
fe990effb1
Merge pull request #638 from mmichal10/missing-return
...
Add missing return in raw_ram_zero() in error path
2022-01-12 12:29:34 +01:00
Michal Mielewczyk
5d74aec921
Add missing return in raw_ram_zero() in error path
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-01-12 07:46:49 +01:00
Robert Baldyga
9d62972b74
Merge pull request #632 from arutk/rv_21.12
...
Extended metadata validation in recovery path
2022-01-10 13:27:11 +01:00
Adam Rutkowski
294e02bc1b
Fail cache recovery in case of erroneous mapping
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-10 11:10:02 +01:00
Robert Baldyga
913966e3f9
Merge pull request #630 from arutk/sb_zero
...
atomic initialization of on-disk metadata during cache attach
2022-01-10 09:14:58 +01:00
Adam Rutkowski
9693b82cf9
Only flush superblock at the end of cache attach
...
The purpose of this change is not to write superblock to the cache
drive untill all other sections are initilized on disk in attach()
path. Combined with superblock clearing at the erarlier stage of
attach(), this assures there are no residual mappings in the collision
section in case of power failure during attach with pre-existing
metadata.
This is implemented by removing ocf_metadata_flush_all_set_status() step
at the beginning of ocf_metadata_flush_all().
ocf_metadata_flush_all() is called, except for the attach() case described
above, in two cases:
1. at the end of cache load - potentially after cache recovery
2. during detaching cache drive in cache stop.
To make sure there are no regressions in the first case, an explicit
_ocf_mngt_attach_shutdown_status() is added to load pipeline before
ocf_metadata_flush_all(). The second case is always ran after cache
drive is attached, so dirty status bit must have already be written to
the disk.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-05 13:06:59 +01:00
Adam Rutkowski
196437f9bc
Zero superblock before writing metadata
...
This is the first step towards atomic initialization of metadata
on cache disk.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-01-05 13:06:59 +01:00
Robert Baldyga
c6644116ae
Merge pull request #614 from robertbaldyga/redesign-standby
...
Redesign failover standby API
2022-01-04 14:07:05 +01:00
Robert Baldyga
4d4cdece0d
Merge pull request #637 from jfckm/fix-cache-size-req
...
Fix cache size requirements and some logging
2022-01-03 20:17:21 +01:00
Robert Baldyga
4aa3d8f9df
Remove "unsafe" path from standby load
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-03 20:10:40 +01:00
Jan Musial
ae18ce274e
Fix cache size requirements and some logging
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-01-03 14:30:07 +01:00
Robert Baldyga
02ea894252
Merge pull request #635 from robertbaldyga/fix-closing-volume-stanby-stop
...
Fix closing volume on standby stop
2021-12-30 12:59:28 +01:00
Robert Baldyga
b40fa0c2bf
Fix closing volume on standby stop
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 20:54:45 +01:00
Robert Baldyga
86a2896bcf
Rename "bind" to "standby"
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 20:32:03 +01:00
Robert Baldyga
b25cd91b86
Remove unused ocf_metadata_load_unsafe()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 20:31:43 +01:00
Robert Baldyga
716b5751d6
Redesign failover standby API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 20:31:40 +01:00
Robert Baldyga
4cabc60d40
Avoid loading runtime metadata sections during recovery
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 14:04:19 +01:00
Robert Baldyga
4625763df5
Return error on CRC mismatch during recovery
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 14:04:19 +01:00
Robert Baldyga
e73cbad2c7
Merge pull request #631 from mmichal10/dont-stop-cleaner
...
Don't stop cleaner in activate rollback
2021-12-27 16:51:32 +01:00
Robert Baldyga
6216669a64
Merge pull request #633 from robertbaldyga/fix-standby-detach-stop
...
Fix cache stop after standby detach
2021-12-27 12:05:22 +01:00
Robert Baldyga
0ac66ce4aa
Fix cache stop after standby detach
...
Don't attempt to close cache volume if cache is in standby detached state.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-23 22:39:37 +01:00
Michal Mielewczyk
a8bdba0cb2
Don't stop cleaner in activate rollback
...
Activate is not responsible for starting cleaner so rollback shouldn't stop it
eiter.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-12-23 14:46:28 +01:00
Robert Baldyga
04da4fd4ef
Merge pull request #624 from beef9999/fix-completion-order
...
fix volume_close completion order
2021-12-22 12:38:02 +01:00
Bob Chen
b6de614ada
fix volume_close completion order
...
Signed-off-by: Bob Chen <beef9999@qq.com>
2021-12-22 15:18:34 +08:00
Robert Baldyga
7fd118a734
Merge pull request #623 from Open-CAS/revert-620-fix-completion-order
...
Revert "fix volume_close completion order"
2021-12-21 20:34:58 +01:00
Robert Baldyga
a2916313ee
Revert "fix volume_close completion order"
2021-12-21 20:33:34 +01:00
Robert Baldyga
94ed3dc6d6
Merge pull request #620 from beef9999/fix-completion-order
...
fix volume_close completion order
2021-12-21 10:40:34 +01:00
chenbo
aa6e674034
fix volume_close completion order
2021-12-20 20:10:07 +08:00
Robert Baldyga
067f7ad074
Merge pull request #612 from robertbaldyga/fix-metadata-flapping
...
Fix metadata flapping
2021-12-16 13:08:58 +01:00
Robert Baldyga
0751b2c0c0
Fix metadata flapping
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-15 22:21:57 +01:00
Robert Baldyga
cac5869406
Merge pull request #603 from robertbaldyga/metadata-flapping
...
Introduce flapping of metadata config sections
2021-12-15 17:11:15 +01:00
Robert Baldyga
df9a9f2722
Read superblock sections from cache volume during activate
...
Because of metadata flapping it is much more complicated to capture those
sections in flight in standby mode, so we read them directly from the cache
volume during the activate.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-15 15:30:34 +01:00
Robert Baldyga
98cb9bff70
pyocf: Use bigger cache device size in tests
...
As amount of fixed size metadata allocated by OCF grows, we need to adjust
test to not try to start cache on device that is too small.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-15 15:30:34 +01:00
Robert Baldyga
99c8c05f3f
Introduce flapping of metadata config sections
...
This feature provides double buffering of config sections to prevent
situation when power failure during metadata flush leads to partially
updated metadata. Flapping mechanism makes it always possible to perform
graceful rollback to previous config metadata content in such situation.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-15 15:30:34 +01:00
Robert Baldyga
058d701f8c
Merge pull request #607 from robertbaldyga/pyocf-add-error-codes
...
pyocf: Add missing error codes
2021-12-14 16:03:05 +01:00
Robert Baldyga
ee92a0fe7c
Merge pull request #610 from loyou/open-cas-linux-issue-1015
...
Fix incorrect page count calculation with large PAGE_SIZE
2021-12-14 16:02:38 +01:00
Neil Sun
7f82ef3048
Fix incorrect page count calculation with large PAGE_SIZE
...
e.g., PAGE_SIZE 65536, cache line 8k.
fix https://github.com/Open-CAS/open-cas-linux/issues/1015
Signed-off-by: Sun Feng <loyou85@gmail.com>
2021-12-14 20:07:59 +08:00
Robert Baldyga
6d1a5c733e
pyocf: Add missing error codes
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-13 15:58:59 +01:00
Robert Baldyga
60218759d2
Merge pull request #597 from rafalste/fix_core_zero_size_error
...
Fix core-zero-size error
2021-12-08 22:04:27 +01:00
Robert Baldyga
21c4673251
Merge pull request #600 from mmichal10/cleaning-cmpl
...
Call completion if failed to perform cleaning
2021-12-08 22:00:58 +01:00
Robert Baldyga
e3a58b93fa
Merge pull request #599 from mmichal10/use-after-free
...
Fix a few memory management related issues
2021-12-08 21:59:52 +01:00
Michal Mielewczyk
d6f2998890
Call completion if failed to perform cleaning
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-12-08 14:50:50 +01:00
Michal Mielewczyk
911a5cddf0
Deinit all registered volume types
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-12-08 14:16:49 +01:00