From 0495943c35f467a35f0832fb67f02e133a9b8b4e Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 12 Feb 2025 14:50:19 +0000 Subject: [PATCH] osd: use std::string::starts_with() in PGLog::read_log_and_missing() Signed-off-by: Radoslaw Zarzynski --- src/osd/PGLog.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 38874eeeae6..10c7fc0e7ea 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -1479,7 +1479,7 @@ public: decode(on_disk_rollback_info_trimmed_to, bp); } else if (key == "may_include_deletes_in_missing") { missing.may_include_deletes = true; - } else if (key.substr(0, 7) == std::string("missing")) { + } else if (key.starts_with("missing")) { hobject_t oid; pg_missing_item item; decode(oid, bp); @@ -1489,7 +1489,7 @@ public: ceph_assert(missing.may_include_deletes); } missing.add(oid, std::move(item)); - } else if (key.substr(0, 4) == std::string("dup_")) { + } else if (key.starts_with("dup_")) { ++total_dups; pg_log_dup_t dup; decode(dup, bp); -- 2.39.5