]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: keep ref to deleted onode in _do_remove
authorSage Weil <sage@redhat.com>
Tue, 10 Oct 2017 19:00:30 +0000 (14:00 -0500)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 20 Feb 2019 10:36:10 +0000 (13:36 +0300)
We need to make sure we carry this ref through until the object is
deleted or else another request right try to read it before the kv
txn is applied.  (This is easy to trigger now that onreadable is completed
at queue time instead of commit time.)

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 0347518d02eda4e0e2da5241f1d77bc7304d59fb)

src/os/bluestore/BlueStore.cc

index 6d601aaac83ab33de5ab040b49c1724e326c1457..abf77ec189b82bd7d2ffd119e6f49b5ad6fcf88b 100644 (file)
@@ -10966,6 +10966,7 @@ int BlueStore::_do_remove(
   txc->removed(o);
   o->extent_map.clear();
   o->onode = bluestore_onode_t();
+  txc->note_modified_object(o);
   _debug_obj_on_delete(o->oid);
 
   if (!is_gen || maybe_unshared_blobs.empty()) {