]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/osd_types: always call mark_fully_dirty for missing.add
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 24 Aug 2019 02:56:57 +0000 (10:56 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 26 Aug 2019 05:12:55 +0000 (13:12 +0800)
In general we shall build missing set (and hence clean_regions)
based on pg log. However, currently there are still 5 cases we might call
missing.add to add a new pg_missing_item into the missing set
explicitly (or replace an existing pg_missing_item entirely):

1. we explicitly build missing set on startup, in which case
we know we are trying to be compatiable with pre-kraken versions,
so it should be ok for us to disable inc-recovery.

2. we are currently processing authoritative log, and there are
some divergent objects detected. For simplicity (and correctness),
we should disable inc-recovery entirly for these objects.

3. we are re-building missing set, e.g., due to the global
CEPH_OSDMAP_RECOVERY_DELETES policy changing.
In this case we know we are at the end of upgrading from a
pervious version that is lack of CEPH_OSDMAP_RECOVERY_DELETES support.
Hence it should be the recommended option to disable inc-recovery
simultaneously since these objects should be lack of inc-recovery support
too.

4. we are adding or re-adding missing object into primary's missing_loc.
It doesn't matter whether we have a correct clean_regions there
since we never actually refer to that field from missing_loc
when we actually start to perform object recovery later.

5. we are auto-repairing a corrupted object and hence the need of
adding it to the corresponding missing set first, e.g, by leveraging
the existing recovery procedure. In this case, we always disable
inc-recovery to make sure this object can be fully (and correctly)
recovered later.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/osd_types.h

index 895f4a32bd1d3856215def87ac5f9f1861da7e3e..a0f1aa81993f2c81f1381ac3eccbbcea129f89dc 100644 (file)
@@ -4527,9 +4527,9 @@ public:
   }
 
   void add(const hobject_t& oid, eversion_t need, eversion_t have,
-          bool is_delete, bool make_dirty = true) {
+          bool is_delete) {
     //if have== eversion_t() means that the object does not exist, we transfer new_object = true
-    missing[oid] = item(need, have, is_delete, make_dirty, have == eversion_t());
+    missing[oid] = item(need, have, is_delete, true, have == eversion_t());
     rmissing[need.version] = oid;
     tracker.changed(oid);
   }