]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix to update missing state correctly
authormyoungwon oh <ohmyoungwon@gmail.com>
Mon, 7 Dec 2020 13:46:49 +0000 (22:46 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Sat, 12 Dec 2020 12:50:45 +0000 (21:50 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/osd/PrimaryLogPG.cc

index 47127382280043046df9f1d3e5422ba49b595c78..ff68a8ce9dc50b7b487295b6b94d1d37d78c5b5a 100644 (file)
@@ -7068,7 +7068,7 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
        }
        if (chunk_length == obs.oi.size) {
          // truncate
-         for (auto p : obs.oi.manifest.chunk_map) {
+         for (auto &p : obs.oi.manifest.chunk_map) {
            p.second.set_flag(chunk_info_t::FLAG_MISSING);
          }
          t->truncate(obs.oi.soid, 0);