From 92f5b753958c8af598c131c9132c6f94afc3b802 Mon Sep 17 00:00:00 2001 From: Changcheng Liu Date: Wed, 30 Dec 2020 13:30:41 +0800 Subject: [PATCH] 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 --- src/librbd/cache/pwl/AbstractWriteLog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.47.3