From: xie xingguo Date: Sat, 24 Aug 2019 02:56:57 +0000 (+0800) Subject: osd/osd_types: always call mark_fully_dirty for missing.add X-Git-Tag: v15.1.0~1761^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=679f0777a72c2987e28524229d611f5bc0af651a;p=ceph.git osd/osd_types: always call mark_fully_dirty for missing.add 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 --- diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 895f4a32bd1..a0f1aa81993 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -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); }