From: Radoslaw Zarzynski Date: Wed, 22 Sep 2021 14:39:30 +0000 (+0000) Subject: crimson/os: workaround the segfaulting GCC 11 issue. X-Git-Tag: v17.1.0~820^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c04f5a2acf73ef8d87a5560d74951cf4b0cc7683;p=ceph-ci.git crimson/os: workaround the segfaulting GCC 11 issue. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/os/cyanstore/cyan_store.cc b/src/crimson/os/cyanstore/cyan_store.cc index 0f5efc1f7e7..3dbe9e874fd 100644 --- a/src/crimson/os/cyanstore/cyan_store.cc +++ b/src/crimson/os/cyanstore/cyan_store.cc @@ -103,6 +103,9 @@ private: CyanStore::mkfs_ertr::future<> CyanStore::mkfs(uuid_d new_osd_fsid) { + static const char read_meta_errmsg[]{"read_meta"}; + static const char parse_fsid_errmsg[]{"failed to parse fsid"}; + static const char match_ofsid_errmsg[]{"unmatched osd_fsid"}; return read_meta("fsid").then([=](auto&& ret) -> mkfs_ertr::future<> { auto& [r, fsid_str] = ret; if (r == -ENOENT) { @@ -113,17 +116,14 @@ CyanStore::mkfs_ertr::future<> CyanStore::mkfs(uuid_d new_osd_fsid) } return write_meta("fsid", fmt::format("{}", osd_fsid)); } else if (r < 0) { - static const char msg[]{"read_meta"}; - return crimson::stateful_ec{ singleton_ec() }; + return crimson::stateful_ec{ singleton_ec() }; } else { logger().info("mkfs already has fsid {}", fsid_str); if (!osd_fsid.parse(fsid_str.c_str())) { - static const char msg[]{"failed to parse fsid"}; - return crimson::stateful_ec{ singleton_ec() }; + return crimson::stateful_ec{ singleton_ec() }; } else if (osd_fsid != new_osd_fsid) { logger().error("on-disk fsid {} != provided {}", osd_fsid, new_osd_fsid); - static const char msg[]{"unmatched osd_fsid"}; - return crimson::stateful_ec{ singleton_ec() }; + return crimson::stateful_ec{ singleton_ec() }; } else { return mkfs_ertr::now(); }