Skip to content

Commit

Permalink
Bump libnvme crate rev
Browse files Browse the repository at this point in the history
  • Loading branch information
papertigers committed Jun 25, 2024
1 parent 6d47d2d commit 27cebc0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
13 changes: 9 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ key-manager = { path = "key-manager" }
kstat-rs = "0.2.4"
libc = "0.2.155"
libfalcon = { git = "https://github.com/oxidecomputer/falcon", rev = "e69694a1f7cc9fe31fab27f321017280531fb5f7" }
libnvme = { git = "https://github.com/oxidecomputer/libnvme", rev = "0eed4e4929fc2311326646e818e065823ac9a695" }
libnvme = { git = "https://github.com/oxidecomputer/libnvme", rev = "dd5bb221d327a1bc9287961718c3c10d6bd37da0" }
linear-map = "1.2.0"
macaddr = { version = "1.0.1", features = ["serde_std"] }
maplit = "1.0.2"
Expand Down
13 changes: 8 additions & 5 deletions sled-hardware/src/illumos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ enum Error {
NvmeHandleInit(#[from] libnvme::NvmeInitError),

#[error("libnvme error: {0}")]
NvmeError(#[from] libnvme::NvmeError),
Nvme(#[from] libnvme::NvmeError),

#[error("libnvme controller error: {0}")]
NvmeController(#[from] libnvme::controller::NvmeControllerError),

#[error("Unable to grab NVMe Controller lock")]
NvmeControllerLocked,

#[error("Failed to get NVMe Controller's firmware log page: {0}")]
FirmwareLogPage(#[from] libnvme::firmware::FirmwareLogPageError),
}

const GIMLET_ROOT_NODE_NAME: &str = "Oxide,Gimlet";
Expand Down Expand Up @@ -557,10 +563,7 @@ fn poll_blkdev_node(
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(String::to_string))
.collect(),
firmware_log_page.slot_iter().map(|s| s.map(str::to_string)).collect(),
);

let disk = UnparsedDisk::new(
Expand Down
2 changes: 2 additions & 0 deletions sled-hardware/src/illumos/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ pub enum NvmeFormattingError {
NvmeInit(#[from] libnvme::NvmeInitError),
#[error(transparent)]
Nvme(#[from] libnvme::NvmeError),
#[error(transparent)]
NvmeController(#[from] libnvme::controller::NvmeControllerError),
#[error("Device is missing expected LBA format")]
LbaFormatMissing,
#[error("Device has {0} active namespaces but we expected 1")]
Expand Down

0 comments on commit 27cebc0

Please sign in to comment.