mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
osd: set dirty flag if chunks are overwritten
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
This commit is contained in:
parent
322d2a5718
commit
437bb83c8b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user