]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/rgw_file: Fix the incorrect lru object eviction 37804/head
authorluo rixin <luorixin@huawei.com>
Tue, 1 Sep 2020 09:06:40 +0000 (17:06 +0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 26 Oct 2020 18:44:23 +0000 (19:44 +0100)
commiteb3f1a06b20d38a6621f92611912d7a770d30caf
tree92661fbac2183b7b9354228ca3d8322b48668563
parenta2010cbc82ce53c909c3d230726d633f552e43a1
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