]> 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:36:28 +0000 (12:36 +0200)
commit2bd305811e88db7a99ae5e2dc76219e0f8265f93
tree47391415ada017504437fcf6eac719fabf2a921b
parent35ecc8601ae9255a0e4d5b5b5390d41cc110e2df
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