Skip to content

Commit

Permalink
Merge pull request #3497 from mulkieran/version-3.6.2
Browse files Browse the repository at this point in the history
Version 3.6.2
  • Loading branch information
mulkieran committed Nov 16, 2023
2 parents 6aa3b29 + f04dfef commit 67d1427
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 8 deletions.
20 changes: 19 additions & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,25 @@ jobs:
- fedora-rawhide

- job: tests
identifier: local
trigger: pull_request
manual_trigger: true
targets:
- fedora-rawhide

# run Cockpit storage tests, see plans/ with `cockpit == yes`
- job: tests
identifier: cockpit
trigger: pull_request
notifications:
failure_comment:
message: "Cockpit tests failed for commit {commit_sha}. @martinpitt, @jelly, @mvollmer please check."
targets:
- fedora-development
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/repo/fedora-$releasever/group_cockpit-main-builds-fedora-$releasever.repo
tmt:
context:
plan: "cockpit"
11 changes: 11 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
stratisd 3.6.2
==============
Recommended Rust toolchain version: 1.73.0
Recommended development platform for Python development: Fedora 38

- Cherry-picked commits:
* Run cockpit storage tests in PRs
* Remove manual_trigger key from packit test config
* Fix alignment of metadata device to data block size


stratisd 3.6.1
==============
Recommended Rust toolchain version: 1.73.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stratisd"
version = "3.6.1"
version = "3.6.2"
authors = ["Stratis Developers <stratis-devel@lists.fedorahosted.org>"]
edition = "2021"
rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN
Expand Down
5 changes: 5 additions & 0 deletions plans/all.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
summary: top level management

adjust:
when: plan == cockpit
enabled: false

prepare:
- name: Install packages
how: install
Expand Down
20 changes: 20 additions & 0 deletions plans/cockpit.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# reverse dependency test for https://github.com/cockpit-project/cockpit
# packit should automatically notify the cockpit maintainers on failures.
# For questions, please contact @martinpitt, @jelly, @mvollmer

enabled: false
adjust:
when: plan == cockpit
enabled: true

discover:
how: fmf
url: https://github.com/cockpit-project/cockpit
ref: main
execute:
how: tmt

/optional:
summary: Run tests for optional packages (including storage)
discover+:
test: /test/browser/optional
18 changes: 13 additions & 5 deletions src/engine/strat_engine/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ pub fn clevis_luks_regen(dev_path: &Path, keyslot: c_uint) -> StratisResult<()>

/// Determine the number of sectors required to house the specified parameters for
/// the thin pool that determine metadata size.
///
/// Precondition: block_size is a power of 2.
pub fn thin_metadata_size(
block_size: Sectors,
pool_size: Sectors,
Expand Down Expand Up @@ -468,16 +470,22 @@ pub fn thin_metadata_size(
})?
.read_to_string(&mut output)?;
if is_ok {
Ok(min(
THIN_META_MULT_FACTOR
let round = block_size - Sectors(1);
let determined_size = Sectors(
*(THIN_META_MULT_FACTOR
* Sectors(
output
.trim()
.parse::<u64>()
.map_err(|e| StratisError::Msg(e.to_string()))?,
),
MAX_META_SIZE.sectors(),
))
)
+ round)
& !*round,
);
assert!(determined_size % block_size == Sectors(0));
let max = Sectors(*MAX_META_SIZE.sectors() & !*round);
assert!(max % block_size == Sectors(0));
Ok(min(determined_size, max))
} else {
Err(StratisError::Msg(format!(
"thin_metadata_size failed: {output}"
Expand Down

0 comments on commit 67d1427

Please sign in to comment.