From f70e6b201a4d1e0aac8ba03740b1f8e05d8215bb Mon Sep 17 00:00:00 2001 From: vinutha17 <48065441+vinutha17@users.noreply.github.com> Date: Tue, 19 Mar 2019 16:09:01 -0400 Subject: [PATCH] Update main.rs --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 078f150..88b37df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -145,7 +145,8 @@ fn check_for_failed_disks( let mut dev_path = PathBuf::from("/dev"); let dev_name = state_machine.block_device.device.name.clone(); - dev_path.push(state_machine.block_device.device.name); + // dev_path.push(state_machine.block_device.device.name); + dev_path.push(&dev_name); if state_machine.block_device.state == State::WaitingForReplacement { description.push_str(&format!("\nDisk path: {}", dev_path.display())); @@ -259,6 +260,7 @@ fn check_for_failed_disks( } // Handle the ones that ended up stuck in Fail } else if state_machine.block_device.state == State::Fail { + save_state(pool,&state_machine.block_device, state_machine.block_device.state)?; error!("Disk {} ended in a Fail state", dev_path.display(),); } else { // The rest should be State::Good ?