]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: prevent rename src from getting trimmed from lru
authorSage Weil <sage@redhat.com>
Wed, 30 Mar 2016 14:26:18 +0000 (10:26 -0400)
committerSage Weil <sage@redhat.com>
Wed, 30 Mar 2016 15:23:15 +0000 (11:23 -0400)
commitdcc5cead10222e1f90cc95f98ba8fb2f6c3af250
tree23c455abc24c2718ed4549ceea574d8a57ae0604
parentd9fc4aad8254fc8d4d9e78785b03eef8f19b2456
os/bluestore: prevent rename src from getting trimmed from lru

We were putting it at the end of the LRU *and* not holding a reference.

Fix by letting oldo carry a ref to the Onode.  This avoids a subsequent
lookup and also prevents it from getting trimmed.

Note that we could also put it at the front of the LRU, but given that it
is the rename source, I'm not sure that's appropriate.  For example,
temp recovery objects get renamed into place and we don't want to keep
negative onodes for those around.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h