Skip to content

Commit

Permalink
LifecycleMap -> DeviceMap
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Jul 2, 2024
1 parent aacaff8 commit d712bf6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/propolis-server/src/lib/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::time::{SystemTime, UNIX_EPOCH};

use crate::serial::Serial;
use crate::stats::virtual_machine::VirtualMachine;
use crate::vm::{BlockBackendMap, CrucibleBackendMap, LifecycleMap};
use crate::vm::{BlockBackendMap, CrucibleBackendMap, DeviceMap};
use anyhow::{Context, Result};
use crucible_client_types::VolumeConstructionRequest;
pub use nexus_client::Client as NexusClient;
Expand Down Expand Up @@ -110,7 +110,7 @@ pub struct MachineInitializerState {
pub struct MachineInitializer<'a> {
pub(crate) log: slog::Logger,
pub(crate) machine: &'a Machine,
pub(crate) devices: LifecycleMap,
pub(crate) devices: DeviceMap,
pub(crate) block_backends: BlockBackendMap,
pub(crate) crucible_backends: CrucibleBackendMap,
pub(crate) spec: &'a InstanceSpecV0,
Expand Down
2 changes: 1 addition & 1 deletion bin/propolis-server/src/lib/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ mod state_publisher;

/// Maps component names to lifecycle trait objects that allow
/// components to be started, paused, resumed, and halted.
pub(crate) type LifecycleMap =
pub(crate) type DeviceMap =
BTreeMap<String, Arc<dyn propolis::common::Lifecycle>>;

/// Maps component names to block backend trait objects.
Expand Down
7 changes: 3 additions & 4 deletions bin/propolis-server/src/lib/vm/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard};
use crate::{serial::Serial, vcpu_tasks::VcpuTaskController};

use super::{
state_driver::VmStartReason, BlockBackendMap, CrucibleBackendMap,
LifecycleMap,
state_driver::VmStartReason, BlockBackendMap, CrucibleBackendMap, DeviceMap,
};

/// A collection of components that make up a Propolis VM instance.
Expand All @@ -49,7 +48,7 @@ pub(super) struct InputVmObjects {
pub instance_spec: InstanceSpecV0,
pub vcpu_tasks: Box<dyn VcpuTaskController>,
pub machine: Machine,
pub lifecycle_components: LifecycleMap,
pub lifecycle_components: DeviceMap,
pub block_backends: BlockBackendMap,
pub crucible_backends: CrucibleBackendMap,
pub com1: Arc<Serial<LpcUart>>,
Expand All @@ -73,7 +72,7 @@ pub(crate) struct VmObjectsLocked {

/// Maps from component names to the trait objects that implement lifecycle
/// operations (e.g. pause and resume) for eligible components.
lifecycle_components: LifecycleMap,
lifecycle_components: DeviceMap,

/// Maps from component names to trait objects that implement the block
/// storage backend trait.
Expand Down

0 comments on commit d712bf6

Please sign in to comment.