]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: fix wrong promotion after writing snapshot
authormyoungwon oh <ohmyoungwon@gmail.com>
Tue, 9 Feb 2021 06:50:22 +0000 (15:50 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Mon, 29 Mar 2021 08:12:37 +0000 (17:12 +0900)
commit99c7c1621168950473dad5777f97419e2e23018f
tree87dc3b090d30221a160ccbb74d433c0ed89bf75b
parentef0ebdb7259abed4dcbf6bdc6c5bc6edbd7f3d12
osd: fix wrong promotion after writing snapshot

Let's assume the following scenario.
snap_create() -> write() -> tier_promote() -> read().
write() trigger to create a snapshot with current chunk_map, but
it does not update chunk_map even if the write() overwrites the region.
So, tier_promote() will overwrite the region by writing old chunk to there.

To avoid this, update_chunk_map_by_dirty is added by splitting
dec_refcount_by_dirty

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h