From: Samuel Just Date: Wed, 19 Feb 2014 21:49:20 +0000 (-0800) Subject: ReplicatedPG: fix stat uses to use the correct shard X-Git-Tag: v0.78~148^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c337f63806bfb6ee9e26c19dbc5f5245bfafa84d;p=ceph.git ReplicatedPG: fix stat uses to use the correct shard Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4e11fc848d9aa..239c754f06391 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -10100,7 +10100,10 @@ void ReplicatedPG::check_local() dout(10) << " checking " << p->soid << " at " << p->version << dendl; struct stat st; - int r = osd->store->stat(coll, p->soid, &st); + int r = osd->store->stat( + coll, + ghobject_t(p->soid, ghobject_t::NO_GEN, pg_whoami.shard), + &st); if (r != -ENOENT) { derr << __func__ << " " << p->soid << " exists, but should have been " << "deleted" << dendl; @@ -10298,7 +10301,10 @@ void ReplicatedPG::hit_set_persist() ++ctx->at_version.version; struct stat st; - int r = osd->store->stat(coll, old_obj, &st); + int r = osd->store->stat( + coll, + ghobject_t(old_obj, ghobject_t::NO_GEN, pg_whoami.shard), + &st); assert(r == 0); --ctx->delta_stats.num_objects; ctx->delta_stats.num_bytes -= st.st_size; @@ -10390,7 +10396,10 @@ void ReplicatedPG::hit_set_trim(RepGather *repop, unsigned max) info.hit_set.history.pop_front(); struct stat st; - int r = osd->store->stat(coll, oid, &st); + int r = osd->store->stat( + coll, + ghobject_t(oid, ghobject_t::NO_GEN, pg_whoami.shard), + &st); assert(r == 0); --repop->ctx->delta_stats.num_objects; repop->ctx->delta_stats.num_bytes -= st.st_size;