• Kent Overstreet's avatar
    bcachefs: Split out dev_buckets_free() · 30f0349d
    Kent Overstreet authored
    Previously, dev_buckets_available() only counted buckets that are
    eligible to be allocated right now - i.e. buckets that don't have cached
    data, or need discard, or need gc gens, etc.
    
    But most users of this function want to know how many buckets are
    eligible to be allocated from without moving data around - copygc,
    allocator striping, which means we should be including cached data
    buckets etc.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    30f0349d
alloc_foreground.c 34.3 KB