Skip to content

Commit

Permalink
Try #1591:
Browse files Browse the repository at this point in the history
  • Loading branch information
mayastor-bors committed Feb 19, 2024
2 parents b54c403 + 6259f6e commit 0e8ed5d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions io-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ async-process = { version = "1.8.1" }
rstack = { version = "0.3.3" }
tokio-stream = "0.1.14"

devinfo = { path = "../utils/dependencies/devinfo" }
jsonrpc = { path = "../jsonrpc"}
io-engine-api = { path = "../utils/dependencies/apis/io-engine" }
spdk-rs = { path = "../spdk-rs" }
Expand Down
9 changes: 6 additions & 3 deletions io-engine/src/host/blk_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ use std::{
collections::HashMap,
ffi::{OsStr, OsString},
io::Error,
io::ErrorKind
};

use crate::constants::{NEXUS_CAS_DRIVER, NVME_CONTROLLER_MODEL_ID};
use proc_mounts::{MountInfo, MountIter};
use devinfo::mountinfo::{MountInfo, SafeMountIter};
use udev::{Device, Enumerator};

// Struct representing a property value in a udev::Device struct (and possibly
Expand Down Expand Up @@ -278,7 +278,10 @@ fn new_device(
fn get_mounts() -> Result<HashMap<OsString, Vec<MountInfo>>, Error> {
let mut table: HashMap<OsString, Vec<MountInfo>> = HashMap::new();

for mount in (MountIter::new()?).flatten() {
for mount in SafeMountIter::get()
.map_err(|err| Error::new(ErrorKind::Other, err))?
.flatten()
{
let mount_source = OsString::from(mount.source.clone());
if !table.contains_key(&mount_source) {
table.insert(mount_source.clone(), Vec::new());
Expand Down

0 comments on commit 0e8ed5d

Please sign in to comment.