]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: touch onode in cache LRU explicitly. 50072/head
authorIgor Fedotov <igor.fedotov@croit.io>
Fri, 13 Jan 2023 12:04:48 +0000 (15:04 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Fri, 10 Feb 2023 15:53:12 +0000 (18:53 +0300)
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit 1d4abf7e39fbfce674095161bfd002d0b5abece5)

  Conflicts:
    src/os/bluestore/BlueStore.cc
  <no bacport for https://github.com/ceph/ceph/pull/43299>

src/os/bluestore/BlueStore.cc

index 3a29368d1074b8b3f31f76e2c78e4bcb590d095c..b014931029c42ae7d9cc57ac54176431c118f4d9 100644 (file)
@@ -1088,13 +1088,17 @@ struct LruOnodeCacheShard : public BlueStore::OnodeCacheShard {
          ceph_assert(num);
          --num;
          o->clear_cached();
+         dout(20) << __func__ << " " << this << " " << o->oid << " removed"
+                   << dendl;
           // remove will also decrement nref
           o->c->onode_space._remove(o->oid);
         }
       } else if (o->exists) {
         // move onode within LRU
-        _rm(o);
-        _add(o, 1);
+        lru.erase(lru.iterator_to(*o));
+        lru.push_front(*o);
+        dout(20) << __func__ << " " << this << " " << o->oid << " touched"
+                 << dendl;
       }
     }
     ocs->lock.unlock();