From: Kefu Chai Date: Mon, 11 May 2026 05:46:25 +0000 (+0800) Subject: crimson: consolidate the return paths of get_segment_manager() X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68839%2Fhead;p=ceph.git crimson: consolidate the return paths of get_segment_manager() before this change, two branches both return `BlockSegmentManager`, which is redundant. in this change, consolidate them so that the `HAVE_ZNS` path becomes an early return. this improves readability. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/os/seastore/segment_manager.cc b/src/crimson/os/seastore/segment_manager.cc index 90a95be0a430..0672b84a1374 100644 --- a/src/crimson/os/seastore/segment_manager.cc +++ b/src/crimson/os/seastore/segment_manager.cc @@ -44,12 +44,9 @@ SegmentManager::get_segment_manager( INFO("Found {} zones.", nr_zones); if (nr_zones != 0) { co_return std::make_unique(device + "/block"); - } else { - co_return std::make_unique(device + "/block", dtype); } -#else - co_return std::make_unique(device + "/block", dtype); #endif + co_return std::make_unique(device + "/block", dtype); } } // namespace crimson::os::seastore