]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: set dirty flag if chunks are overwritten
authormyoungwon oh <omwmw@sk.com>
Sat, 2 Dec 2017 12:41:57 +0000 (21:41 +0900)
committermyoungwon oh <omwmw@sk.com>
Sun, 7 Jan 2018 13:40:47 +0000 (22:40 +0900)
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
src/osd/PrimaryLogPG.cc

index 48bf42eb4cf99e82c91ab692369796cc4057269c..0f57703eadd7ad2e52975e1b6e4ed0c51f4692dd 100644 (file)
@@ -7627,6 +7627,15 @@ void PrimaryLogPG::write_update_size_and_usage(object_stat_sum_t& delta_stats, o
     }
     delta_stats.num_bytes += oi.extents.size();
   }
+  
+  if (oi.has_manifest() && oi.manifest.is_chunked()) {
+    for (auto &p : oi.manifest.chunk_map) {
+      if ((p.first <= offset && p.first + p.second.length > offset) ||
+         (p.first > offset && p.first <= offset + length)) {
+       p.second.flags = chunk_info_t::FLAG_DIRTY;
+      }
+    }
+  }
   delta_stats.num_wr++;
   delta_stats.num_wr_kb += SHIFT_ROUND_UP(length, 10);
 }