Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix metadata flush #342

Merged
merged 2 commits into from
Jan 24, 2020
Merged

Fix metadata flush #342

merged 2 commits into from
Jan 24, 2020

Conversation

mmichal10
Copy link
Contributor

@mmichal10 mmichal10 commented Jan 23, 2020

@codecov
Copy link

codecov bot commented Jan 23, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@89f0e96). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master     #342   +/-   ##
=========================================
  Coverage          ?   61.03%           
=========================================
  Files             ?       81           
  Lines             ?     9139           
  Branches          ?        0           
=========================================
  Hits              ?     5578           
  Misses            ?     3561           
  Partials          ?        0
Impacted Files Coverage Δ
src/utils/utils_cache_line.c 100% <100%> (ø)
src/metadata/metadata_status.h 84.61% <100%> (ø)

@arutk arutk assigned michalwy and unassigned michalwy Jan 23, 2020
@arutk arutk requested a review from michalwy January 23, 2020 10:37
robertbaldyga
robertbaldyga previously approved these changes Jan 23, 2020
src/metadata/metadata_status.h Outdated Show resolved Hide resolved
@mmichal10 mmichal10 force-pushed the fix-metadata-flush branch 3 times, most recently from 3d6a24d to e8f2bd9 Compare January 24, 2020 15:00
Michal Mielewczyk added 2 commits January 24, 2020 11:27
After second dirty write to cache line which was already dirty, metadata flush
was not triggered. In case of dirty shutdown, this led to data corruption.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
In case of cleaning metadata used to be flushed only when status of whole cache
line changed to clean.

This patch ensures that metadata flush is triggered after changin status of each
single sector is cache line.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
@michalwy michalwy removed the request for review from mdziegie January 24, 2020 16:59
@michalwy michalwy merged commit fabd412 into Open-CAS:master Jan 24, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write Back: Will the cache device reflush uncommitted data to core device after a system crash?
5 participants