Skip to content

Commit

Permalink
os/bluestore: assert shared blob cache cleared on split
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Sep 7, 2016
1 parent 2d8a145 commit fad3d99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8215,7 +8215,9 @@ int BlueStore::_split_collection(TransContext *txc,
// blow away the caches. FIXME.
c->onode_map.clear();
d->onode_map.clear();
#warning assert that shared_blob cache (and others?) are also cleared..

assert(c->shared_blob_set.empty());
assert(d->shared_blob_set.empty());

c->cnode.bits = bits;
assert(d->cnode.bits == bits);
Expand Down
4 changes: 4 additions & 0 deletions src/os/bluestore/BlueStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ class BlueStore : public ObjectStore,
}
return false;
}

bool empty() {
return uset.empty();
}
};

/// in-memory blob metadata and associated cached buffers (if any)
Expand Down

0 comments on commit fad3d99

Please sign in to comment.