]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: make set_last_backfill() assume bitwise
authorSage Weil <sage@redhat.com>
Wed, 8 Feb 2017 21:58:54 +0000 (16:58 -0500)
committerSage Weil <sage@redhat.com>
Sat, 11 Feb 2017 15:45:16 +0000 (10:45 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PrimaryLogPG.cc
src/osd/osd_types.h

index 43e9be44ac55688436890a1c1fc70fe2ce0b9a74..f7f2695b368f80d5fb99a948f8e76e5186861b01 100644 (file)
@@ -8415,7 +8415,7 @@ void OSD::handle_pg_query(OpRequestRef op)
      * before the pg is recreated, we'll just start it off backfilling
      * instead of just empty */
     if (service.deleting_pgs.lookup(pgid))
-      empty.set_last_backfill(hobject_t(), true);
+      empty.set_last_backfill(hobject_t());
     if (it->second.type == pg_query_t::LOG ||
        it->second.type == pg_query_t::FULLLOG) {
       ConnectionRef con = service.get_con_osd_cluster(from, osdmap->get_epoch());
index 8757d28c5efb811b717f76fae67e0850799fc4da..54f9fd24ca545977974931fc36eb11de3a11c133 100644 (file)
@@ -1701,7 +1701,7 @@ void PG::activate(ObjectStore::Transaction& t,
 
        pi.last_update = info.last_update;
        pi.last_complete = info.last_update;
-       pi.set_last_backfill(hobject_t(), get_sort_bitwise());
+       pi.set_last_backfill(hobject_t());
        pi.last_epoch_started = info.last_epoch_started;
        pi.history = info.history;
        pi.hit_set = info.hit_set;
@@ -2262,15 +2262,14 @@ void PG::split_into(pg_t child_pgid, PG *child, unsigned split_bits)
   child->info.purged_snaps = info.purged_snaps;
 
   if (info.last_backfill.is_max()) {
-    child->info.set_last_backfill(hobject_t::get_max(),
-                                 info.last_backfill_bitwise);
+    child->info.set_last_backfill(hobject_t::get_max());
   } else {
     // restart backfill on parent and child to be safe.  we could
     // probably do better in the bitwise sort case, but it's more
     // fragile (there may be special work to do on backfill completion
     // in the future).
-    info.set_last_backfill(hobject_t(), info.last_backfill_bitwise);
-    child->info.set_last_backfill(hobject_t(), info.last_backfill_bitwise);
+    info.set_last_backfill(hobject_t());
+    child->info.set_last_backfill(hobject_t());
   }
 
   child->info.stats = info.stats;
@@ -2921,7 +2920,7 @@ void PG::init(
 
   if (backfill) {
     dout(10) << __func__ << ": Setting backfill" << dendl;
-    info.set_last_backfill(hobject_t(), get_sort_bitwise());
+    info.set_last_backfill(hobject_t());
     info.last_complete = info.last_update;
     pg_log.mark_log_for_rewrite();
   }
index 6fb307e3fbaf5f9cb8d322f99cfa259392dae640..e160709cfb2f68148be26f8c7b42f08e4e17affd 100644 (file)
@@ -3467,7 +3467,7 @@ void PrimaryLogPG::do_backfill(OpRequestRef op)
     {
       assert(cct->_conf->osd_kill_backfill_at != 2);
 
-      info.set_last_backfill(m->last_backfill, get_sort_bitwise());
+      info.set_last_backfill(m->last_backfill);
       if (m->compat_stat_sum) {
        info.stats.stats = m->stats.stats; // Previously, we only sent sum
       } else {
@@ -9986,7 +9986,7 @@ void PrimaryLogPG::on_removal(ObjectStore::Transaction *t)
   dout(10) << "on_removal" << dendl;
 
   // adjust info to backfill
-  info.set_last_backfill(hobject_t(), true);
+  info.set_last_backfill(hobject_t());
   pg_log.reset_backfill();
   dirty_info = true;
 
@@ -11216,7 +11216,7 @@ uint64_t PrimaryLogPG::recover_backfill(
     pg_info_t& pinfo = peer_info[bt];
 
     if (new_last_backfill > pinfo.last_backfill) {
-      pinfo.set_last_backfill(new_last_backfill, get_sort_bitwise());
+      pinfo.set_last_backfill(new_last_backfill);
       epoch_t e = get_osdmap()->get_epoch();
       MOSDPGBackfill *m = NULL;
       if (pinfo.last_backfill.is_max()) {
index 74f50022847775a0dc52573d5133f6575127df5b..318a902856aa0b199edb16a280d833231ad62d73 100644 (file)
@@ -2210,9 +2210,9 @@ struct pg_info_t {
       last_backfill_bitwise(false)
   { }
   
-  void set_last_backfill(hobject_t pos, bool sort) {
+  void set_last_backfill(hobject_t pos) {
     last_backfill = pos;
-    last_backfill_bitwise = sort;
+    last_backfill_bitwise = true;
   }
 
   bool is_empty() const { return last_update.version == 0; }