From: Changcheng Liu Date: Wed, 30 Dec 2020 05:30:41 +0000 (+0800) Subject: librbd/cache/pwl: correct update previous_sync_point_entry X-Git-Tag: v16.1.0~136^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38735%2Fhead;p=ceph.git librbd/cache/pwl: correct update previous_sync_point_entry Always update previous_sync_point_entry value whatever its old value. Signed-off-by: Changcheng Liu --- diff --git a/src/librbd/cache/pwl/AbstractWriteLog.cc b/src/librbd/cache/pwl/AbstractWriteLog.cc index d5bac1b50939..72a836a339f4 100644 --- a/src/librbd/cache/pwl/AbstractWriteLog.cc +++ b/src/librbd/cache/pwl/AbstractWriteLog.cc @@ -465,11 +465,11 @@ void AbstractWriteLog::update_sync_points(std::map &missing_s ceph_assert(previous_sync_point_entry->prior_sync_point_flushed); ceph_assert(previous_sync_point_entry->writes == previous_sync_point_entry->writes_flushed); } - previous_sync_point_entry = sync_point_entry; } else { /* There are no previous sync points, so we'll consider them flushed */ sync_point_entry->prior_sync_point_flushed = true; } + previous_sync_point_entry = sync_point_entry; ldout(m_image_ctx.cct, 10) << "Loaded to sync point=[" << *sync_point_entry << dendl; } }