mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: config: Switch DiskConfig to use PciDeviceCommonConfig
Switch DiskConfig over to using the newly extracted struct members as used by all PCI based devices. The use of #[serde(flatten)] means that this change has no impact on the JSON format that the data is stored as. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -285,13 +285,13 @@ pub struct PciDeviceCommonConfig {
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct DiskConfig {
|
||||
#[serde(flatten)]
|
||||
pub pci_common: PciDeviceCommonConfig,
|
||||
pub path: Option<PathBuf>,
|
||||
#[serde(default)]
|
||||
pub readonly: bool,
|
||||
#[serde(default)]
|
||||
pub direct: bool,
|
||||
#[serde(default)]
|
||||
pub iommu: bool,
|
||||
#[serde(default = "default_diskconfig_num_queues")]
|
||||
pub num_queues: usize,
|
||||
#[serde(default = "default_diskconfig_queue_size")]
|
||||
@@ -303,8 +303,6 @@ pub struct DiskConfig {
|
||||
pub rate_limit_group: Option<String>,
|
||||
#[serde(default)]
|
||||
pub rate_limiter_config: Option<RateLimiterConfig>,
|
||||
#[serde(default)]
|
||||
pub id: Option<String>,
|
||||
// For testing use only. Not exposed in API.
|
||||
#[serde(default)]
|
||||
pub disable_io_uring: bool,
|
||||
@@ -312,8 +310,6 @@ pub struct DiskConfig {
|
||||
#[serde(default)]
|
||||
pub disable_aio: bool,
|
||||
#[serde(default)]
|
||||
pub pci_segment: u16,
|
||||
#[serde(default)]
|
||||
pub serial: Option<String>,
|
||||
#[serde(default)]
|
||||
pub queue_affinity: Option<Vec<VirtQueueAffinity>>,
|
||||
|
||||
Reference in New Issue
Block a user