From b9b07c13e42c36938450358eaad0dedc54b9d7c4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 3 Apr 2016 09:35:03 -0400 Subject: [PATCH] osd/ReplicatedPG: tolerate pgls commands with full hash Signed-off-by: Sage Weil --- src/osd/ReplicatedPG.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index e65c084286859..3958f8942ea57 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -925,8 +925,10 @@ void ReplicatedPG::do_pg_op(OpRequestRef op) // fall through case CEPH_OSD_OP_PGNLS: - if (m->get_pg() != info.pgid.pgid) { - dout(10) << " pgnls pg=" << m->get_pg() << " != " << info.pgid << dendl; + if (get_osdmap()->raw_pg_to_pg(m->get_pg()) != info.pgid.pgid) { + dout(10) << " pgnls pg=" << m->get_pg() + << " " << get_osdmap()->raw_pg_to_pg(m->get_pg()) + << " != " << info.pgid << dendl; result = 0; // hmm? } else { unsigned list_size = MIN(cct->_conf->osd_max_pgls, p->op.pgls.count); @@ -1127,8 +1129,10 @@ void ReplicatedPG::do_pg_op(OpRequestRef op) // fall through case CEPH_OSD_OP_PGLS: - if (m->get_pg() != info.pgid.pgid) { - dout(10) << " pgls pg=" << m->get_pg() << " != " << info.pgid << dendl; + if (get_osdmap()->raw_pg_to_pg(m->get_pg()) != info.pgid.pgid) { + dout(10) << " pgls pg=" << m->get_pg() + << " " << get_osdmap()->raw_pg_to_pg(m->get_pg()) + << " != " << info.pgid << dendl; result = 0; // hmm? } else { unsigned list_size = MIN(cct->_conf->osd_max_pgls, p->op.pgls.count); -- 2.39.5