diff --git a/Cargo.lock b/Cargo.lock index cc401daab..edd838b03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -798,7 +798,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", @@ -851,7 +851,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", @@ -864,7 +864,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", @@ -894,7 +894,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 2a1bc9e69..1d0f8dad5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,8 +81,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,