]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/cache/pwl/ssd: Fix a race between get_cache_bl() and remove_cache_bl()
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 7 Sep 2021 02:00:53 +0000 (10:00 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Tue, 7 Sep 2021 02:33:50 +0000 (10:33 +0800)
commitfe72b3953735329441397f257d5dd18f6819187d
tree101719df9f837330075d70f4fa152700a4b349a4
parentca906d0d7a65c8a598d397b764dd262cce645fe3
librbd/cache/pwl/ssd: Fix a race between get_cache_bl() and remove_cache_bl()

In fact, although in get_cache_bl it use lock to protect, it can't
protect function "list& operator= (const list& other)".
So we should use copy_cache_bl.

Fixes: https://tracker.ceph.com/issues/52400
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/librbd/cache/pwl/LogEntry.h
src/librbd/cache/pwl/ssd/LogEntry.cc
src/librbd/cache/pwl/ssd/LogEntry.h
src/librbd/cache/pwl/ssd/WriteLog.cc