Assert is seen when crimson-osd is compiled with -DWITH_ZNS=ON and
crimson-osd is started with a regular SSD.
ceph/src/crimson/os/seastore/segment_manager.h:77 : In function 'void crimson::os::seastore::block_sm_superblock_t::validate() const', ceph_assert(%s)
get_default_backend_of_device(config.spec.dtype) == backend_type_t::SEGMENTED
The device type "dtype" is not getting propogated properly
to BlockSegmentManager instantiation causing the assert at a
later point.
Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com>
(cherry picked from commit
cb73d3a9b7a3d6ff5b44e9fd1285aadf7ae787d7)
LOG_PREFIX(SegmentManager::get_segment_manager);
return seastar::do_with(
static_cast<size_t>(0),
- [&](auto &nr_zones) {
+ [FNAME,
+ dtype,
+ device](auto &nr_zones) {
return seastar::open_file_dma(
device + "/block",
seastar::open_flags::rw
- ).then([&](auto file) {
+ ).then([FNAME,
+ dtype,
+ device,
+ &nr_zones](auto file) {
return seastar::do_with(
file,
- [=, &nr_zones](auto &f) -> seastar::future<int> {
+ [&nr_zones](auto &f) -> seastar::future<int> {
ceph_assert(f);
return f.ioctl(BLKGETNRZONES, (void *)&nr_zones);
});
- }).then([&](auto ret) -> crimson::os::seastore::SegmentManagerRef {
+ }).then([FNAME,
+ dtype,
+ device,
+ &nr_zones](auto ret) -> crimson::os::seastore::SegmentManagerRef {
crimson::os::seastore::SegmentManagerRef sm;
INFO("Found {} zones.", nr_zones);
if (nr_zones != 0) {