Skip to content

Commit

Permalink
os/bluestore: keep ref to deleted onode in _do_remove
Browse files Browse the repository at this point in the history
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 0347518)
  • Loading branch information
liewegas authored and ifed01 committed Feb 20, 2019
1 parent a2f258e commit fb2ceeb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/os/bluestore/BlueStore.cc
Expand Up @@ -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()) {
Expand Down

0 comments on commit fb2ceeb

Please sign in to comment.