Skip to content

Commit a65b17d

Browse files
authored
nvme_test: Adding Clone to the FaultConfiguration (#1923)
Adds the Clone capability for the FaultConfiguration. This is required for some subsequent changes where there FaultConfiguration needs to be referenced by several structs. Makes things easy to just clone it since it is very little overhead
1 parent 3e0e0a4 commit a65b17d

File tree

1 file changed

+2
-2
lines changed
  • vm/devices/storage/nvme_resources/src

1 file changed

+2
-2
lines changed

vm/devices/storage/nvme_resources/src/fault.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ pub enum QueueFaultBehavior<T> {
2121
Delay(Duration),
2222
}
2323

24-
#[derive(MeshPayload)]
24+
#[derive(MeshPayload, Clone)]
2525
/// A buildable fault configuration
2626
pub struct AdminQueueFaultConfig {
2727
/// A map of NVME opcodes to the fault behavior for each. (This would ideally be a `HashMap`, but `mesh` doesn't support that type. Given that this is not performance sensitive, the lookup is okay)
2828
pub admin_submission_queue_faults: Vec<(u8, QueueFaultBehavior<Command>)>,
2929
}
3030

31-
#[derive(MeshPayload)]
31+
#[derive(MeshPayload, Clone)]
3232
/// A simple fault configuration with admin submission queue support
3333
pub struct FaultConfiguration {
3434
/// Fault active state

0 commit comments

Comments
 (0)