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

storage: Don't warn about missing bitmap when MDRAID has a journal #20404

Merged

Conversation

mvollmer
Copy link
Member

A mdraid can have different consistency policies, and "bitmap" is only one of them. We should only tell people to add a bitmap when the policy is "resync".

UDisks2 and Cockpit don't understand consistency policy at all, so we do the bare minimum here to detect a journal.

Fixes #20381

@mvollmer
Copy link
Member Author

mvollmer commented May 3, 2024

UDisks2 will have a ConsistencyPolicy in the next release. We can already start to use it here.

@mvollmer mvollmer marked this pull request as draft May 3, 2024 12:09
A mdraid can have different consistency policies, and "bitmap" is only
one of them. We should only tell people to add a bitmap when the
policy is "resync".

UDisks2 will have a ConsistencyPolicy property soonish, and we
approximate its value until then.

Fixes cockpit-project#20381
@mvollmer mvollmer force-pushed the storage-no-bitmap-with-journal branch from 096d664 to 670d22a Compare May 3, 2024 12:47
@mvollmer mvollmer marked this pull request as ready for review May 3, 2024 12:48
@mvollmer mvollmer requested a review from jelly May 3, 2024 12:49
@@ -174,9 +174,19 @@ function add_disk(mdraid) {
}

function missing_bitmap(mdraid) {
let policy;
if (mdraid.ConsistencyPolicy)
policy = mdraid.ConsistencyPolicy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected.

@jelly jelly merged commit c3e66e6 into cockpit-project:main May 6, 2024
82 checks passed
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.

storage: bitmap detection is incorrect for MD arrays that use journaling
3 participants