Skip to content

Commit

Permalink
Revert unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaublitz committed Jun 17, 2022
1 parent 6f7c816 commit 7675d53
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/engine/strat_engine/thinpool/thinpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,21 +622,25 @@ impl ThinPool {
let mdv = MetadataVol::setup(pool_uuid, mdv_dev)?;
let filesystem_metadatas = mdv.filesystems()?;

let mut filesystems = Vec::with_capacity(filesystem_metadatas.len());
for fssave in filesystem_metadatas.iter() {
match StratFilesystem::setup(pool_uuid, &thinpool_dev, fssave) {
Ok(fs) => {
fs.udev_fs_change(pool_name, fssave.uuid, &fssave.name);
filesystems.push((Name::new(fssave.name.to_owned()), fssave.uuid, fs));
}
Err(err) => {
warn!(
"Filesystem specified by metadata {:?} could not be setup, reason: {:?}",
fssave, err
);
}
}
}
let filesystems = filesystem_metadatas
.iter()
.filter_map(
|fssave| match StratFilesystem::setup(pool_uuid, &thinpool_dev, fssave) {
Ok(fs) => {
fs.udev_fs_change(pool_name, fssave.uuid, &fssave.name);
Some((Name::new(fssave.name.to_owned()), fssave.uuid, fs))
},
Err(err) => {
warn!(
"Filesystem specified by metadata {:?} could not be setup, reason: {:?}",
fssave,
err
);
None
}
},
)
.collect::<Vec<_>>();

let mut fs_table = Table::default();
for (name, uuid, fs) in filesystems {
Expand Down

0 comments on commit 7675d53

Please sign in to comment.