Robert Baldyga
481e5b7b9b
Introduce bisect generator utility
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
93391c78d8
Parallelize ACP recovery
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
b70492ad3d
Parallelize ALRU recovery
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
8cc71cc9cb
Remove ocf_cleaning_init_cache_block() from metadata rebuild
...
Cleaning policy initializaton initializes metadata for all cache lines
anyway, so this step is not needed.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:30:41 +01:00
Robert Baldyga
48bed40dd7
Reconstruct freelist during metadata rebuild
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:30:39 +01:00
Robert Baldyga
f3e4f8c2db
Parallelize ocf_mngt_rebuild_metadata()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:52 +01:00
Robert Baldyga
036aca41b3
Parallelize ocf_lru_populate()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
6611b25d1e
Initialize LRU lists in domain of cache lines
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
57fd5c1f20
Introduce ocf_parallelize utility
...
Introduce utility that allows to parallelize management operation across
all available io queues.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
a947127f55
Introduce ocf_lru_add_free() function
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
b82d30a0ef
Add missing hb lock functions implementation
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
25e2551964
Check core status during recovery based on core metadata
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
568c565497
Init properties before loading superblock
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +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