]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: allow reuse of osr from existing collection
authorSage Weil <sage@redhat.com>
Sun, 8 Jul 2018 19:24:49 +0000 (14:24 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:07:56 +0000 (12:07 -0500)
commit044ce83b1e032b5996cad10bc1cf83918f991550
treed037dec3083d38b71aeedf8def9abcba6bb4a520
parent8a1100bf5915383b370e85b1c723717de23f121a
os/bluestore: allow reuse of osr from existing collection

We try to attach an old osr at prepare_new_collection time, but that
happens before a transaction is submitted, and we might have a
transaction that removes and then recreates a collection.

Move the logic to _osr_attach and extend it to include reusing an osr
in use by a collection already in coll_map.  Also adjust the
_osr_register_zombie method to behave if the osr is already there, which
can happen with a remove, create, remove+create transaction sequence.

Fixes: https://tracker.ceph.com/issues/25180
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h