From: Bill Scales Date: Fri, 11 Jul 2025 11:59:40 +0000 (+0100) Subject: osd: EC optimizations keep log entries on all shards X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4eb3640e7609c034a99dcdab7c67489df63879f8;p=ceph-ci.git osd: EC optimizations keep log entries on all shards When a shard is backfilling it gets given log entries for partial writes even if they do not apply to the shard. The code was updating the missing list but discarding the log entry. This is wrong because the update can be rolled backwards and the log entry is required to revert the update to the missing list. Keeping the log entry has a small but insignificant performance impact. Signed-off-by: Bill Scales (cherry picked from commit 1fa5302092cbbb37357142d01ca008cae29d4f5e) --- diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 4ece20c0e13..1430f949658 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -1404,11 +1404,7 @@ public: invalidate_stats = invalidate_stats || !p->is_error(); if (log) { ldpp_dout(dpp, 20) << "update missing, append " << *p << dendl; - // Skip the log entry if it is a partial write that did not involve - // this shard - if (!pool.is_nonprimary_shard(shard) || p->is_written_shard(shard)) { - log->add(*p); - } + log->add(*p); } if (p->soid <= last_backfill && !p->is_error()) {