From e8f1e7c41604af47a9c6ca717a9985494810daf3 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 13 Mar 2024 13:36:03 +0000 Subject: [PATCH] osd: drop the is_systematic from ErasureCodeInterface This method has introduced by the intial EC partial read effort. However, at the moment there is no implementation of the `ErasureCodeInterface` that returns `false`. In other words: all out EC algorithms are systematic (for explanation of this term please refer to Wikipedia: https://en.wikipedia.org/wiki/Systematic_code). Signed-off-by: Radoslaw Zarzynski --- src/erasure-code/ErasureCode.cc | 4 ---- src/erasure-code/ErasureCode.h | 2 -- src/erasure-code/ErasureCodeInterface.h | 5 ----- src/osd/ECBackend.cc | 8 +------- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/erasure-code/ErasureCode.cc b/src/erasure-code/ErasureCode.cc index 39a96e0f1e123..ef92ea7219d89 100644 --- a/src/erasure-code/ErasureCode.cc +++ b/src/erasure-code/ErasureCode.cc @@ -373,8 +373,4 @@ int ErasureCode::decode_concat(const map &chunks, } return decode_concat(want_to_read, chunks, decoded); } - -bool ErasureCode::is_systematic() const { - return true; -} } diff --git a/src/erasure-code/ErasureCode.h b/src/erasure-code/ErasureCode.h index 5a4b3e5185b32..2ae40b6368604 100644 --- a/src/erasure-code/ErasureCode.h +++ b/src/erasure-code/ErasureCode.h @@ -118,8 +118,6 @@ namespace ceph { int decode_concat(const std::map &chunks, bufferlist *decoded) override; - bool is_systematic() const override; - protected: int parse(const ErasureCodeProfile &profile, std::ostream *ss); diff --git a/src/erasure-code/ErasureCodeInterface.h b/src/erasure-code/ErasureCodeInterface.h index fb4463c9590ef..673136a701ba5 100644 --- a/src/erasure-code/ErasureCodeInterface.h +++ b/src/erasure-code/ErasureCodeInterface.h @@ -467,11 +467,6 @@ namespace ceph { virtual int decode_concat(const std::map &chunks, bufferlist *decoded) = 0; - - /** - * @return **true** if the EC plugin's data placement is systematic. - */ - virtual bool is_systematic() const = 0; }; typedef std::shared_ptr ErasureCodeInterfaceRef; diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 188004e64596e..46e57a25951e4 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -1539,17 +1539,12 @@ int ECBackend::objects_read_sync( } static bool should_partial_read( - const ceph::ErasureCodeInterface& ec_impl, bool fast_read) { // Don't partial read if we are doing a fast_read if (fast_read) { return false; } - // Don't partial read if the EC isn't systematic - if (!ec_impl.is_systematic()) { - return false; - } return true; } @@ -1566,8 +1561,7 @@ void ECBackend::objects_read_async( extent_set es; for (const auto& [read, ctx] : to_read) { pair tmp; - if (!cct->_conf->osd_ec_partial_reads || - !should_partial_read(*ec_impl, fast_read)) { + if (!cct->_conf->osd_ec_partial_reads || !should_partial_read(fast_read)) { tmp = sinfo.offset_len_to_stripe_bounds(make_pair(read.offset, read.size)); } else { tmp = sinfo.offset_len_to_chunk_bounds(make_pair(read.offset, read.size)); -- 2.39.5