From b3d6c6c0f59c70c7e999456c17163518fe2440c8 Mon Sep 17 00:00:00 2001 From: Alan Hanson Date: Fri, 25 Oct 2024 11:21:12 -0700 Subject: [PATCH] Update Crucible version (#802) Add test and fix for replay race condition (#1519) Fix clippy warnings (#1517) Add edition to `crucible-workspace-hack` (#1516) Split out Downstairs-specific stats (#1511) Move remaining `GuestWork` functionality into `Downstairs` (#1510) Track both jobs and bytes in each IO state (#1507) Fix new `rustc` and `clippy` warnings (#1509) Remove IOP/BW limits (for now) (#1506) Move `GuestBlockRes` into `DownstairsIO` (#1502) Update actions/checkout digest to eef6144 (#1499) Update Rust crate hyper-staticfile to 0.10.1 (#1411) Turn off test-up-2region-encrypted.sh (#1504) Add `IOop::Barrier` (#1494) Fix IPv6 addresses in `crutest` (#1503) Add region set options to more tests. (#1496) Simplify `CompleteJobs` (#1493) Removed ignored CI jobs (#1497) Minor cleanups to `print_last_completed` (#1501) Remove remaining `Arc` instances (#1500) Add `VolumeBuilder` type (#1492) remove old unused scripts (#1495) More multiple region support. (#1484) Simplify matches (#1490) Move complete job tracker to a helper object (#1489) Expand summary and add documentation references to the README. (#1486) Remove `GuestWorkId` (2/2) (#1482) Remove `JobId` from `DownstairsIO` (1/2) (#1481) Remove unused `#[derive(..)]` (#1483) Update more tests to use dsc (#1480) Crutest now Volume only (#1479) Co-authored-by: Alan Hanson --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- lib/propolis/src/block/crucible.rs | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee24cf2fb..036951799 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -825,7 +825,7 @@ checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crucible" version = "0.0.1" -source = "git+https://github.com/oxidecomputer/crucible?rev=2b88ab88461fb06aaf2aab11c5e381a3cad25eac#2b88ab88461fb06aaf2aab11c5e381a3cad25eac" +source = "git+https://github.com/oxidecomputer/crucible?rev=b7b9d5660b28ca5e865242b2bdecd032c0852d40#b7b9d5660b28ca5e865242b2bdecd032c0852d40" dependencies = [ "aes-gcm-siv", "anyhow", @@ -878,7 +878,7 @@ dependencies = [ [[package]] name = "crucible-client-types" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/crucible?rev=2b88ab88461fb06aaf2aab11c5e381a3cad25eac#2b88ab88461fb06aaf2aab11c5e381a3cad25eac" +source = "git+https://github.com/oxidecomputer/crucible?rev=b7b9d5660b28ca5e865242b2bdecd032c0852d40#b7b9d5660b28ca5e865242b2bdecd032c0852d40" dependencies = [ "base64 0.22.1", "crucible-workspace-hack", @@ -891,7 +891,7 @@ dependencies = [ [[package]] name = "crucible-common" version = "0.0.1" -source = "git+https://github.com/oxidecomputer/crucible?rev=2b88ab88461fb06aaf2aab11c5e381a3cad25eac#2b88ab88461fb06aaf2aab11c5e381a3cad25eac" +source = "git+https://github.com/oxidecomputer/crucible?rev=b7b9d5660b28ca5e865242b2bdecd032c0852d40#b7b9d5660b28ca5e865242b2bdecd032c0852d40" dependencies = [ "anyhow", "atty", @@ -921,7 +921,7 @@ dependencies = [ [[package]] name = "crucible-protocol" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/crucible?rev=2b88ab88461fb06aaf2aab11c5e381a3cad25eac#2b88ab88461fb06aaf2aab11c5e381a3cad25eac" +source = "git+https://github.com/oxidecomputer/crucible?rev=b7b9d5660b28ca5e865242b2bdecd032c0852d40#b7b9d5660b28ca5e865242b2bdecd032c0852d40" dependencies = [ "anyhow", "bincode", diff --git a/Cargo.toml b/Cargo.toml index feb79ee40..4d93671e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,8 +82,8 @@ oximeter = { git = "https://github.com/oxidecomputer/omicron", branch = "main" } sled-agent-client = { git = "https://github.com/oxidecomputer/omicron", branch = "main" } # Crucible -crucible = { git = "https://github.com/oxidecomputer/crucible", rev = "2b88ab88461fb06aaf2aab11c5e381a3cad25eac" } -crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "2b88ab88461fb06aaf2aab11c5e381a3cad25eac" } +crucible = { git = "https://github.com/oxidecomputer/crucible", rev = "b7b9d5660b28ca5e865242b2bdecd032c0852d40" } +crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "b7b9d5660b28ca5e865242b2bdecd032c0852d40" } # External dependencies anyhow = "1.0" diff --git a/lib/propolis/src/block/crucible.rs b/lib/propolis/src/block/crucible.rs index 8383044b5..0061da493 100644 --- a/lib/propolis/src/block/crucible.rs +++ b/lib/propolis/src/block/crucible.rs @@ -5,6 +5,7 @@ //! Implement a virtual block device backed by Crucible use std::io; +use std::ops::Deref; use std::sync::Arc; use crate::accessors::MemAccessor; @@ -14,6 +15,7 @@ use crate::vmm::MemCtx; use crucible::{ BlockIO, Buffer, CrucibleError, ReplaceResult, SnapshotDetails, Volume, + VolumeBuilder, }; use crucible_client_types::VolumeConstructionRequest; use oximeter::types::ProducerRegistry; @@ -55,7 +57,7 @@ impl WorkerState { }; let res = if let Some(memctx) = acc_mem.access() { match process_request( - &self.volume, + self.volume.deref(), &self.info, self.skip_flush, &req, @@ -182,8 +184,8 @@ impl CrucibleBackend { block_size, size as usize, )); - let mut volume = Volume::new(block_size, log); - volume + let mut builder = VolumeBuilder::new(block_size, log); + builder .add_subvolume(mem_disk) .await .map_err(|e| std::io::Error::from(e))?; @@ -191,7 +193,7 @@ impl CrucibleBackend { Ok(Arc::new(CrucibleBackend { state: Arc::new(WorkerState { attachment: block::BackendAttachment::new(), - volume, + volume: builder.into(), info: block::DeviceInfo { block_size: block_size as u32, total_size: size / block_size,