]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/PrimaryLogPG: fix dirty range of write_full
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 14 Aug 2019 06:12:43 +0000 (14:12 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 19 Aug 2019 00:39:07 +0000 (08:39 +0800)
commite2f278675d185682176d36752428fe397028e60a
treee248c4b81c66ff83210fded39362382e39a20002
parent8e0e2bbadcef75ce96c8b798f3d6611a55f25800
osd/PrimaryLogPG: fix dirty range of write_full

A write_full operation may implicitly truncate the object down,
hence we need to mark the truncated part as dirty as well since
follow-up randomized writes may still be able to (re)extend the
object size and leave some holes against the truncated part,
which as a result might cause problems during incremental-mode
recovery.

Note that write_update_size_and_usage would reset oi.size
and that's why we move the mark_data_region_dirty call before that.

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