• Kent Overstreet's avatar
    bcache: Don't bother with bucket refcount for btree node allocations · 3a3b6a4e
    Kent Overstreet authored
    The bucket refcount (dropped with bkey_put()) is only needed to prevent
    the newly allocated bucket from being garbage collected until we've
    added a pointer to it somewhere. But for btree node allocations, the
    fact that we have btree nodes locked is enough to guard against races
    with garbage collection.
    
    Eventually the per bucket refcount is going to be replaced with
    something specific to bch_alloc_sectors().
    Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
    3a3b6a4e
alloc.c 17.4 KB