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 <k.chai@proxmox.com>
INFO("Found {} zones.", nr_zones);
if (nr_zones != 0) {
co_return std::make_unique<segment_manager::zbd::ZBDSegmentManager>(device + "/block");
- } else {
- co_return std::make_unique<segment_manager::block::BlockSegmentManager>(device + "/block", dtype);
}
-#else
- co_return std::make_unique<segment_manager::block::BlockSegmentManager>(device + "/block", dtype);
#endif
+ co_return std::make_unique<segment_manager::block::BlockSegmentManager>(device + "/block", dtype);
}
} // namespace crimson::os::seastore