]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/osd/PGLog.cc
import 15.2.0 Octopus source
[ceph.git] / ceph / src / osd / PGLog.cc
index 3aeeb55e79f21fad2bbd05c0786cda8a43b6f05d..9e81f9f5f3b13d8abf867dcf9b296d2fe5aaa3ad 100644 (file)
@@ -85,6 +85,7 @@ void PGLog::IndexedLog::trim(
          auto it = e.extra_reqid_return_codes.find(idx);
          if (it != e.extra_reqid_return_codes.end()) {
            return_code = it->second;
+           // FIXME: we aren't setting op_returns for these extra_reqids
          }
        }
        ++idx;
@@ -458,7 +459,6 @@ void PGLog::merge_log(pg_info_t &oinfo, pg_log_t &olog, pg_shard_t fromosd,
     new_entries.splice(new_entries.end(), olog.log, from, to);
     append_log_entries_update_missing(
       info.last_backfill,
-      info.last_backfill_bitwise,
       new_entries,
       false,
       &log,
@@ -621,7 +621,7 @@ void PGLog::write_log_and_missing(
   const ghobject_t &log_oid,
   bool require_rollback)
 {
-  if (is_dirty()) {
+  if (needs_write()) {
     dout(6) << "write_log_and_missing with: "
             << "dirty_to: " << dirty_to
             << ", dirty_from: " << dirty_from
@@ -644,7 +644,7 @@ void PGLog::write_log_and_missing(
       dirty_to_dups,
       dirty_from_dups,
       write_from_dups,
-      &rebuilt_missing_with_deletes,
+      &may_include_deletes_in_missing_dirty,
       (pg_log_debug ? &log_keys_debug : nullptr));
     undirty();
   } else {
@@ -678,7 +678,7 @@ void PGLog::write_log_and_missing(
     const ghobject_t &log_oid,
     const pg_missing_tracker_t &missing,
     bool require_rollback,
-    bool *rebuilt_missing_with_deletes)
+    bool *may_include_deletes_in_missing_dirty)
 {
   _write_log_and_missing(
     t, km, log, coll, log_oid,
@@ -692,7 +692,7 @@ void PGLog::write_log_and_missing(
     eversion_t::max(),
     eversion_t(),
     eversion_t(),
-    rebuilt_missing_with_deletes, nullptr);
+    may_include_deletes_in_missing_dirty, nullptr);
 }
 
 // static
@@ -828,7 +828,7 @@ void PGLog::_write_log_and_missing(
   eversion_t dirty_to_dups,
   eversion_t dirty_from_dups,
   eversion_t write_from_dups,
-  bool *rebuilt_missing_with_deletes, // in/out param
+  bool *may_include_deletes_in_missing_dirty, // in/out param
   set<string> *log_keys_debug
   ) {
   set<string> to_remove;
@@ -931,9 +931,9 @@ void PGLog::_write_log_and_missing(
   }
   // since we encode individual missing items instead of a whole
   // missing set, we need another key to store this bit of state
-  if (*rebuilt_missing_with_deletes) {
+  if (*may_include_deletes_in_missing_dirty) {
     (*km)["may_include_deletes_in_missing"] = bufferlist();
-    *rebuilt_missing_with_deletes = false;
+    *may_include_deletes_in_missing_dirty = false;
   }
   missing.get_changed(
     [&](const hobject_t &obj) {
@@ -975,7 +975,6 @@ void PGLog::rebuild_missing_set_with_deletes(
     }
   }
   missing.clear();
-  missing.may_include_deletes = true;
 
   // go through the log and add items that are not present or older
   // versions on disk, just as if we were reading the log + metadata
@@ -1014,5 +1013,6 @@ void PGLog::rebuild_missing_set_with_deletes(
   for (const auto& p : extra_missing) {
     missing.add(p.first, p.second.need, p.second.have, p.second.is_delete());
   }
-  rebuilt_missing_with_deletes = true;
+
+  set_missing_may_contain_deletes();
 }