Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I would just remove this commented line and if you want you can change the line above to remove the .clone() like this:

                let dev_name = &state_machine.block_device.device.name;
                dev_path.push(&dev_name)

dev_path.push(&dev_name);

if state_machine.block_device.state == State::WaitingForReplacement {
description.push_str(&format!("\nDisk path: {}", dev_path.display()));
Expand Down Expand Up @@ -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 ?
Expand Down