]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/rgw_file: Fix the incorrect lru object eviction 37672/head
authorluo rixin <luorixin@huawei.com>
Tue, 1 Sep 2020 09:06:40 +0000 (17:06 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Thu, 15 Oct 2020 08:42:39 +0000 (08:42 +0000)
commit795cb4387e5182d03391dca4eed6d68767c13cf6
tree08f66e75a3ad169bff38f513a2a3e246eac91cab
parent2f33da11da69822d9bab6e9cadb58a7cc3d5720f
rgw/rgw_file: Fix the incorrect lru object eviction

In func lookup_fh, when RGWFileHandle not be found in fh_cache, it
need to recycle an object and create an new RGWFileHandle. When there
are multi threads use lookup_fh to find and create RGWFileHandle concurrently,
it must to make sure evict lru object from the partiton of fh_cache which new
RGWFileHandle will be inserted to.

Fixes: https://tracker.ceph.com/issues/47235
Signed-off-by: luo rixin <luorixin@huawei.com>
(cherry picked from commit f2097338722d7f2526bb815da47695f2da17fcce)
src/common/cohort_lru.h
src/rgw/rgw_file.cc
src/rgw/rgw_file.h