Krzysztof Majzerowicz-Jaszcz
06f2140090
Removing ocf_metadata_sb_crc_recovery
...
Removing ocf_metadata_sb_crc_recovery - not used
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-03-04 19:10:47 +01:00
Robert Baldyga
805ea14529
Remove runtime recovery in standby mode
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-02-01 03:11:50 +01:00
Robert Baldyga
e30fd48338
Merge pull request #656 from jfckm/extend-metadata-probe
...
Include cache mode and cache line size in metadata probe
2022-02-04 13:01:10 +01:00
Jan Musial
8522b0b6e6
Include cache mode and cache line size in metadata probe
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-04 08:15:05 +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
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
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
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
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
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
0751b2c0c0
Fix metadata flapping
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-15 22:21:57 +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
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
Michal Mielewczyk
655f732748
Don't access freed memory
...
Instead of accessing memory of a freed IO, redo size calculations
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-12-08 14:16:49 +01:00
Adam Rutkowski
b455a393dd
extra assertion in metadata passive update
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-11-30 12:04:57 +01:00
Adam Rutkowski
d0b00817f3
fix cacheline reset in passive metadata update
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-11-30 19:34:52 +01:00
Michal Mielewczyk
4ab22ee2dc
Maintain runtime struct during failover standby
...
To allow the fastest switching from the passive-standby to active mode, the
runtime metadata must be kept 100% synced with the metadata on the drive and in
the RAM thus recovery is required after each collision section update.
To avoid long-lasting recovering of all the cachelines each time the collision
section is being updated, the passive update procedure recovers only those
which have its MD entries on the updated pages.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-11-19 11:58:09 +01:00
Michal Mielewczyk
048bbedd71
Fix metadata_clear_valid_if_clean()
...
The function should return the cacheline's valid status
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-11-19 11:53:48 +01:00
Michal Mielewczyk
bb0ff67fe9
Metadata clear_dirty_if_invalid()
utility
...
Fix cacheline's metadata if it is dirty and invalid
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-11-19 11:53:48 +01:00
Robert Baldyga
5cbbfdd5ca
Merge pull request #587 from Open-CAS/gcc_11_fix
...
Fix for OCL issue #968 - GCC 11 compilation error
2021-11-08 13:34:52 +01:00
Krzysztof Majzerowicz-Jaszcz
99c54be592
Fix for OCL issue #968 - GCC 11 compilation error
...
GCC 11 static check finds an array size mismatch and prevents OCF from
compiling correctly. This fixes OpenCAS Linux issue #968
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2021-11-08 11:39:17 +01:00
Adam Rutkowski
8f080295bb
Merge pull request #585 from rafalste/license_change
...
Aplying BSD 3-Clause license to OCF source
2021-10-29 13:16:00 +02:00
Rafal Stefanowski
f22da1cde7
Fix license
...
Change license to BSD-3-Clause
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-28 13:08:50 +02:00
Rafal Stefanowski
3cc0d07197
License change to be approved by contributors
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-27 12:48:20 +02:00
Adam Rutkowski
f9fb80b887
Fix conditional valid bit reset
...
Status bits outside provided mask shall be unchanged.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-10-12 22:56:45 +02:00
Robert Baldyga
076b5995ed
Fix metadata_clear_valid_if_clean()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:12:11 +02:00
Robert Baldyga
7587bec07c
Merge pull request #567 from robertbaldyga/optimize-out-recovery-sector-loop
...
Optimize out looping over cache line sectors in recovery
2021-09-08 13:57:32 +02:00
Michal Mielewczyk
612f68b3c1
Fix metadata io detection in passive mode
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-09-08 13:33:04 +02:00
Robert Baldyga
1a3843ba12
Little coding style fix
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-07 22:54:10 +02:00
Robert Baldyga
65d3e7a41a
Introduce ocf_metadata_clear_valid_if_clean()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-07 22:54:10 +02:00
Robert Baldyga
d7c1404f82
Simplify metadata bit function declarations
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-07 22:54:10 +02:00
Robert Baldyga
12a82d7fb1
Get rid of struct ocf_cache_line_settings
...
Remove struct that contains redundant data.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-07 14:53:46 +02:00
Robert Baldyga
d5bd3fbd78
Free zeroed metadata pages on update in raw_dynamic
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-06 13:49:21 +02:00
Robert Baldyga
9b3a0c968e
Introduce ocf_metadata_passive_update()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-06 13:49:21 +02:00
Robert Baldyga
85e8b414c4
Add ocf_metadata_load_unsafe()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-03 17:22:22 +02:00
Robert Baldyga
c6c6618ad8
Move recovery code from metadata to cache mngt
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-03 17:22:22 +02:00
Robert Baldyga
a2db4d14e8
Move core initialization code from metadata to mngt
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-03 17:22:22 +02:00
Robert Baldyga
9ab4c51dfa
Expose superblock operations as part of internal metadata API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-03 17:22:22 +02:00
Robert Baldyga
82abcd11e7
Fix documentation of ocf_metadata_raw_rd_access()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-02 22:38:37 +02:00
Robert Baldyga
387cf1b9a5
Fix debug tracing in metadata
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-02 22:38:37 +02:00
Michal Mielewczyk
26194fc536
Use cleaning ops wrapper functions
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Michal Mielewczyk
6dc29ee85e
Refactor includes
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Robert Baldyga
f538bbd3ae
Fix argument order in ocf_metadata_set_partition_id() call
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-09 21:31:06 +02:00
Robert Baldyga
847f5f1174
Merge pull request #520 from arutk/lru_refactor
...
LRU refactoring
2021-06-21 22:49:08 +02:00
Adam Rutkowski
1e1955b833
lru refactor
...
rearanging lru implementation for easier journaling
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 22:32:57 +02:00
Adam Rutkowski
edf20c133e
Move metadata I/O lock to IO queue context
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 21:39:35 +02:00
Adam Rutkowski
a70608476d
fastpath for metadata update
...
Removing extra request cycle through IO queue in case of successfull
metadata I/O lock.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 20:02:56 +02:00