From: Neha Ojha Date: Thu, 3 Jun 2021 16:25:01 +0000 (+0000) Subject: osd/PG.cc: handle removal of pgmeta object X-Git-Tag: v14.2.22~11^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=790ea2f15760645f88b077af410141aeba5d6237;p=ceph.git osd/PG.cc: handle removal of pgmeta object In 7f04700, we made the pg removal code much more efficient. But it started marking the pgmeta object as an unexpected onode, which in reality is expected to be removed after all the other objects. This behavior is very easily reproducible in a vstart cluster: ceph osd pool create test 1 1 rados -p test bench 10 write --no-cleanup ceph osd pool delete test test --yes-i-really-really-mean-it Before this patch: "do_delete_work additional unexpected onode list (new onodes has appeared since PG removal started[#2:00000000::::head#]" seen in the OSD logs. After this patch: "do_delete_work removing pgmeta object #2:00000000::::head#" is seen. Related to:https://tracker.ceph.com/issues/50466 Signed-off-by: Neha Ojha Manually applied 0e917f1b1e18ca9e48b3f91110d3a46b086f7d83, because nautilus does not have do_delete_work. Signed-off-by: Neha Ojha --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index fda8d569259c1..fbb5f9c12e7a7 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -7154,10 +7154,14 @@ ghobject_t PG::_delete_some(ObjectStore::Transaction *t, max, &olist, &next); - if (!olist.empty()) { - dout(0) << __func__ << " additional unexpected onode list" - <<" (new onodes has appeared since PG removal started" - << olist << dendl; + for (auto& oid : olist) { + if (oid == pgmeta_oid) { + dout(20) << __func__ << " removing pgmeta object " << oid << dendl; + } else { + dout(0) << __func__ << " additional unexpected onode" + <<" new onode has appeared since PG removal started" + << oid << dendl; + } } }