]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/cache/pwl: don't clear next_sync_point_entry prematurely
authorYin Congmin <congmin.yin@intel.com>
Wed, 1 Sep 2021 15:56:18 +0000 (15:56 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 6 Sep 2021 14:18:24 +0000 (16:18 +0200)
commita1a20041d57c9a90bc0a60d86469445ba8efb5ea
treec0e95b05c40d74eb9e1a9f3e6f71386fe8bcd477
parentf8652171f005c6948eadc64602498c26034b1bdc
librbd/cache/pwl: don't clear next_sync_point_entry prematurely

In SyncPointLogOperation::clear_earlier_sync_point(),
sync_point->log_entry->next_sync_point_entry was prematurely set to
nullptr in clear_earlier_sync_point(). It is in write op stage, but
next_sync_point_entry is used in writeback stage in
handle_flushed_sync_point().

handle_flushed_sync_point() may pass a nullptr
cause assert in m_work_queue.The solution is to move the statement
that set next_sync_point_entry to nullptr after it is used.

Fixes: https://tracker.ceph.com/issues/52465
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
src/librbd/cache/pwl/AbstractWriteLog.cc
src/librbd/cache/pwl/LogOperation.cc