]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd/cache/pwl: move write_image_cache_state() out of m_lock
authorYin Congmin <congmin.yin@intel.com>
Thu, 28 Jul 2022 05:43:07 +0000 (13:43 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 3 Sep 2022 10:35:14 +0000 (12:35 +0200)
commit4344e244d61330a0be712f40d08b3fb62b0dc3e8
tree165907a45891805434996dc15fce4ba269b53ff2
parente15b781875c69668cafdb174c9a670e8174adbfa
librbd/cache/pwl: move write_image_cache_state() out of m_lock

periodic_stats() will get m_lock, then get owner_lock. It is opposite
to the lock getting order of SnapshotCreateRequest::handle_notify_quiesce().
move write_image_cache_state() out of m_lock scope. After calling
update_image_cache_state(), and m_lock auto released, then call
write_image_cache_state() to update state in osds.

Fixes: https://tracker.ceph.com/issues/56703
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
(cherry picked from commit a0e2868d9473a9120c4c5d478f6a592859ce1aec)
src/librbd/cache/pwl/AbstractWriteLog.cc
src/librbd/cache/pwl/AbstractWriteLog.h
src/librbd/cache/pwl/rwl/WriteLog.cc
src/librbd/cache/pwl/ssd/WriteLog.cc