]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd/cache/pwl: correct update previous_sync_point_entry
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 30 Dec 2020 05:30:41 +0000 (13:30 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 30 Dec 2020 05:30:41 +0000 (13:30 +0800)
Always update previous_sync_point_entry value whatever its old
value.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/librbd/cache/pwl/AbstractWriteLog.cc

index d5bac1b509399498dfedd1d5c7586f2bdfee1e8b..72a836a339f41298ba776380b7a48e246a9ff706 100644 (file)
@@ -465,11 +465,11 @@ void AbstractWriteLog<I>::update_sync_points(std::map<uint64_t, bool> &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;
       }
     }