From b37d202f51dfe1c96b3a4dda2743defa805c19af Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Mon, 1 May 2023 18:33:29 -0400 Subject: [PATCH] [sled-agent] Allow synthetic disks to be used as M.2s and U.2s. (#2976) This fixes a bug where the internal zpools created by `./tools/create_virtual_hardware.sh` were ignored by the sled agent - this utility is used in other locations to access "m.2 datasets". --- sled-agent/src/storage_manager.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sled-agent/src/storage_manager.rs b/sled-agent/src/storage_manager.rs index 8e23fc8929..75df7ffeb6 100644 --- a/sled-agent/src/storage_manager.rs +++ b/sled-agent/src/storage_manager.rs @@ -230,11 +230,9 @@ impl StorageResources { disks .values() .filter_map(|disk| { - if let DiskWrapper::Real { disk, .. } = disk { - if disk.variant() == variant { - return Some(disk.zpool_name().clone()); - } - }; + if disk.variant() == variant { + return Some(disk.zpool_name().clone()); + } None }) .collect()