From 4efe6aeea626e2c6d72dcb68f748e234facd186d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 10 Dec 2009 09:46:15 -0800 Subject: [PATCH] osd: respond to query on uncreated pg with empty info; do not create We should never create a PG* for an uncreated pg except through the mkpg path. --- src/osd/OSD.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c6b0302c9aa62..9c23bbb6844b5 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3074,6 +3074,7 @@ void OSD::_process_pg_info(epoch_t epoch, int from, // create pg! assert(role != 0); + assert(!info.dne()); pg = _create_lock_pg(info.pgid, t); dout(10) << " got info on new pg, creating" << dendl; pg->acting.swap(acting); @@ -3275,6 +3276,13 @@ void OSD::handle_pg_query(MOSDPGQuery *m) } assert(role > 0); + if (!history.epoch_created) { + dout(10) << " pg " << pgid << " not created, replying with empty info" << dendl; + PG::Info empty(pgid); + notify_list[from].push_back(empty); + continue; + } + ObjectStore::Transaction t; pg = _create_lock_pg(pgid, t); pg->acting.swap( acting ); -- 2.39.5