Skip to content

Commit

Permalink
Stop querying firmware log-page [meta-443]
Browse files Browse the repository at this point in the history
  • Loading branch information
papertigers committed Jul 1, 2024
1 parent 0f757cd commit 6cf9fb7
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions sled-hardware/src/illumos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,31 +540,10 @@ fn poll_blkdev_node(
return Err(Error::UnrecognizedSlot { slot });
};

let nvme = Nvme::new()?;
let controller = Controller::init_by_instance(&nvme, nvme_instance)?;
let controller_lock = match controller.try_read_lock() {
libnvme::controller::TryLockResult::Ok(locked) => locked,
// We should only hit this if something in the system has locked the
// controller in question for writing.
libnvme::controller::TryLockResult::Locked(_) => {
warn!(
log,
"NVMe Controller is already locked so we will try again
in the next hardware snapshot"
);
return Err(Error::NvmeControllerLocked);
}
libnvme::controller::TryLockResult::Err(err) => {
return Err(Error::from(err))
}
};
let firmware_log_page = controller_lock.get_firmware_log_page()?;
let firmware = DiskFirmware::new(
firmware_log_page.active_slot,
firmware_log_page.next_active_slot,
firmware_log_page.slot1_is_read_only,
firmware_log_page.slot_iter().map(|s| s.map(str::to_string)).collect(),
);
// XXX See https://github.com/oxidecomputer/meta/issues/443
// Temporarily providing static data until the issue is resolved.
let firmware =
DiskFirmware::new(1, None, true, vec![Some("meta-443".to_string())]);

let disk = UnparsedDisk::new(
Utf8PathBuf::from(&devfs_path),
Expand Down

0 comments on commit 6cf9fb7

Please sign in to comment.