summaryrefslogtreecommitdiffstats
path: root/src/erasure-code
diff options
context:
space:
mode:
authorRadosław Zarzyński <rzarzyns@redhat.com>2024-06-17 00:02:24 +0200
committerRadoslaw Zarzynski <rzarzyns@redhat.com>2024-06-20 22:37:57 +0200
commit0a9e718d41e302d620e51ef0341aeab266dd9f59 (patch)
treeffe29186bf2ad978ccc55d978be2abbc9bec0d73 /src/erasure-code
parentosd: decode_concat() always honors want_to_read (diff)
downloadceph-0a9e718d41e302d620e51ef0341aeab266dd9f59.tar.xz
ceph-0a9e718d41e302d620e51ef0341aeab266dd9f59.zip
erasure-code: hack the subchunk handling to honor legacy
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
Diffstat (limited to 'src/erasure-code')
-rw-r--r--src/erasure-code/clay/ErasureCodeClay.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/erasure-code/clay/ErasureCodeClay.cc b/src/erasure-code/clay/ErasureCodeClay.cc
index ba37b8c721c..c75ea279651 100644
--- a/src/erasure-code/clay/ErasureCodeClay.cc
+++ b/src/erasure-code/clay/ErasureCodeClay.cc
@@ -306,7 +306,14 @@ int ErasureCodeClay::is_repair(const set<int> &want_to_read,
if (includes(available_chunks.begin(), available_chunks.end(),
want_to_read.begin(), want_to_read.end())) return 0;
+ // Oops, before the attempt to EC partial reads the fellowing
+ // condition was always true as `get_want_to_read_shards()` yields
+ // entire stripe. Unfortunately, we built upon this assumption and
+ // even `ECUtil::decode()` asserts on chunks being multiply of
+ // `chunk_size`.
+ // XXX: for now returning 0 and knocking the optimization out.
if (want_to_read.size() > 1) return 0;
+ else return 0;
int i = *want_to_read.begin();
int lost_node_id = (i < k) ? i: i+nu;