]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge remote branch 'gh/master' into wip-prior
authorSage Weil <sage@newdream.net>
Fri, 21 Oct 2011 15:58:43 +0000 (08:58 -0700)
committerSage Weil <sage@newdream.net>
Fri, 21 Oct 2011 15:58:43 +0000 (08:58 -0700)
Conflicts:
src/osd/PG.cc

1  2 
src/osd/PG.cc
src/osd/PG.h

diff --cc src/osd/PG.cc
index 3b4b2d18162346069a1928a26418df3da665faf4,4766d61d78c9db4a803bcaffabf475e7e5bc227b..cc99a4f59509f534b310ef1f41357f2a490ed569
@@@ -1013,98 -1092,7 +1026,7 @@@ bool PG::all_unfound_are_queried_or_los
    return true;
  }
  
- /* Mark an object as lost
-  */
- void PG::mark_obj_as_lost(ObjectStore::Transaction& t,
-                         const hobject_t &lost_soid)
- {
-   // Wake anyone waiting for this object. Now that it's been marked as lost,
-   // we will just return an error code.
-   map<hobject_t, list<class Message*> >::iterator wmo =
-     waiting_for_missing_object.find(lost_soid);
-   if (wmo != waiting_for_missing_object.end()) {
-     osd->requeue_ops(this, wmo->second);
-   }
-   // Tell the object store that this object is lost.
-   bufferlist b1;
-   int r = osd->store->getattr(coll, lost_soid, OI_ATTR, b1);
-   object_locator_t oloc;
-   oloc.clear();
-   oloc.pool = info.pgid.pool();
-   object_info_t oi(lost_soid, oloc);
-   if (r >= 0) {
-     // Some version of this lost object exists in our filestore.
-     // So, we can fetch its attributes and preserve most of them.
-     oi = object_info_t(b1);
-   }
-   else {
-     // The object doesn't exist in the filestore yet. Make sure that
-     // we create it there.
-     t.touch(coll, lost_soid);
-   }
-   oi.lost = true;
-   oi.version = info.last_update;
-   bufferlist b2;
-   oi.encode(b2);
-   t.setattr(coll, lost_soid, OI_ATTR, b2);
- }
- /* Mark all unfound objects as lost.
-  */
- void PG::mark_all_unfound_as_lost(ObjectStore::Transaction& t)
- {
-   dout(3) << __func__ << dendl;
-   dout(30) << __func__  << ": log before:\n";
-   log.print(*_dout);
-   *_dout << dendl;
-   utime_t mtime = ceph_clock_now(g_ceph_context);
-   eversion_t old_last_update = info.last_update;
-   info.last_update.epoch = osd->osdmap->get_epoch();
-   map<hobject_t, Missing::item>::iterator m = missing.missing.begin();
-   map<hobject_t, Missing::item>::iterator mend = missing.missing.end();
-   while (m != mend) {
-     const hobject_t &soid(m->first);
-     if (missing_loc.find(soid) != missing_loc.end()) {
-       // We only care about unfound objects
-       ++m;
-       continue;
-     }
-     // Add log entry
-     info.last_update.version++;
-     Log::Entry e(Log::Entry::LOST, soid, info.last_update,
-                m->second.need, osd_reqid_t(), mtime);
-     log.add(e);
-     // Object store stuff
-     mark_obj_as_lost(t, soid);
-     // Remove from missing set
-     missing.got(m++);
-   }
-   dout(30) << __func__ << ": log after:\n";
-   log.print(*_dout);
-   *_dout << dendl;
-   if (missing.num_missing() == 0) {
-     // advance last_complete since nothing else is missing!
-     info.last_complete = info.last_update;
-     write_info(t);
-   }
-   // Send out the PG log to all replicas
-   // So that they know what is lost
-   share_pg_log(old_last_update);
- }
 -void PG::build_prior(std::auto_ptr<PgPriorSet> &prior_set)
 +void PG::build_prior(std::auto_ptr<PriorSet> &prior_set)
  {
    if (1) {
      // sanity check
diff --cc src/osd/PG.h
Simple merge