]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: rename ECSubWrite parameter backfill to backfill_or_async_recovery
authorNeha Ojha <nojha@redhat.com>
Mon, 18 Dec 2017 21:25:09 +0000 (13:25 -0800)
committerNeha Ojha <nojha@redhat.com>
Wed, 14 Mar 2018 22:56:05 +0000 (15:56 -0700)
Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/ECBackend.cc
src/osd/ECMsgTypes.cc
src/osd/ECMsgTypes.h

index 9ae86046bdc8051359272b502027577373bbce32..b679efe6b4b3638c17105139b8647edf01c7522c 100644 (file)
@@ -890,7 +890,7 @@ void ECBackend::handle_sub_write(
   if (!op.temp_added.empty()) {
     add_temp_objs(op.temp_added);
   }
-  if (op.backfill) {
+  if (op.backfill_or_async_recovery) {
     for (set<hobject_t>::iterator i = op.temp_removed.begin();
         i != op.temp_removed.end();
         ++i) {
@@ -910,7 +910,7 @@ void ECBackend::handle_sub_write(
     op.updated_hit_set_history,
     op.trim_to,
     op.roll_forward_to,
-    !op.backfill,
+    !op.backfill_or_async_recovery,
     localt);
 
   if (!get_parent()->pg_is_undersized() &&
index 62b83eedc1ba4b6eac1dc0d74e8ea210784fa4e3..239d7811bd0c03886ed2da1197c9b385cf5fa4a2 100644 (file)
@@ -30,7 +30,7 @@ void ECSubWrite::encode(bufferlist &bl) const
   encode(temp_removed, bl);
   encode(updated_hit_set_history, bl);
   encode(roll_forward_to, bl);
-  encode(backfill, bl);
+  encode(backfill_or_async_recovery, bl);
   ENCODE_FINISH(bl);
 }
 
@@ -57,10 +57,10 @@ void ECSubWrite::decode(bufferlist::iterator &bl)
     roll_forward_to = trim_to;
   }
   if (struct_v >= 4) {
-    decode(backfill, bl);
+    decode(backfill_or_async_recovery, bl);
   } else {
-    // The old protocol used an empty transaction to indicate backfill
-    backfill = t.empty();
+    // The old protocol used an empty transaction to indicate backfill or async_recovery
+    backfill_or_async_recovery = t.empty();
   }
   DECODE_FINISH(bl);
 }
@@ -75,8 +75,8 @@ std::ostream &operator<<(
       << ", roll_forward_to=" << rhs.roll_forward_to;
   if (rhs.updated_hit_set_history)
     lhs << ", has_updated_hit_set_history";
-  if (rhs.backfill)
-    lhs << ", backfill";
+  if (rhs.backfill_or_async_recovery)
+    lhs << ", backfill_or_async_recovery";
   return lhs <<  ")";
 }
 
@@ -89,7 +89,7 @@ void ECSubWrite::dump(Formatter *f) const
   f->dump_stream("roll_forward_to") << roll_forward_to;
   f->dump_bool("has_updated_hit_set_history",
       static_cast<bool>(updated_hit_set_history));
-  f->dump_bool("backfill", backfill);
+  f->dump_bool("backfill_or_async_recovery", backfill_or_async_recovery);
 }
 
 void ECSubWrite::generate_test_instances(list<ECSubWrite*> &o)
index 00dca1be049074aa85770efcaa6023347f8f09b8..793d6f8f42980a6cc7c35cedcb07efad4dd5bda4 100644 (file)
@@ -34,7 +34,7 @@ struct ECSubWrite {
   set<hobject_t> temp_added;
   set<hobject_t> temp_removed;
   boost::optional<pg_hit_set_history_t> updated_hit_set_history;
-  bool backfill = false;
+  bool backfill_or_async_recovery = false;
   ECSubWrite() : tid(0) {}
   ECSubWrite(
     pg_shard_t from,
@@ -50,7 +50,7 @@ struct ECSubWrite {
     boost::optional<pg_hit_set_history_t> updated_hit_set_history,
     const set<hobject_t> &temp_added,
     const set<hobject_t> &temp_removed,
-    bool backfill)
+    bool backfill_or_async_recovery)
     : from(from), tid(tid), reqid(reqid),
       soid(soid), stats(stats), t(t),
       at_version(at_version),
@@ -59,7 +59,7 @@ struct ECSubWrite {
       temp_added(temp_added),
       temp_removed(temp_removed),
       updated_hit_set_history(updated_hit_set_history),
-      backfill(backfill)
+      backfill_or_async_recovery(backfill_or_async_recovery)
     {}
   void claim(ECSubWrite &other) {
     from = other.from;
@@ -75,7 +75,7 @@ struct ECSubWrite {
     temp_added.swap(other.temp_added);
     temp_removed.swap(other.temp_removed);
     updated_hit_set_history = other.updated_hit_set_history;
-    backfill = other.backfill;
+    backfill_or_async_recovery = other.backfill_or_async_recovery;
   }
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);