These can survive as long as the txc, which can be longer than the
Collection. Make sure we have a valid ref as both finish_write and
~SharedBlob use coll for the SharedBlobSet (and coll->store->cct for
debug).
Signed-off-by: Sage Weil <sage@redhat.com>
struct BufferSpace;
struct Collection;
+ typedef boost::intrusive_ptr<Collection> CollectionRef;
/// cached buffer
struct Buffer {
std::atomic_int nref = {0}; ///< reference count
bool loaded = false;
- Collection *coll = nullptr;
+ CollectionRef coll;
union {
uint64_t sbid_unloaded; ///< sbid if persistent isn't loaded
bluestore_shared_blob_t *persistent; ///< persistent part of the shared blob if any
Collection(BlueStore *ns, Cache *ca, coll_t c);
};
- typedef boost::intrusive_ptr<Collection> CollectionRef;
class OmapIteratorImpl : public ObjectMap::ObjectMapIteratorImpl {
CollectionRef c;