• Kent Overstreet's avatar
    bcachefs: Don't use BTREE_INSERT_USE_RESERVE so much · 3187aa8d
    Kent Overstreet authored
    Previously, we were using BTREE_INSERT_RESERVE in a lot of places where
    it no longer makes sense.
    
     - we now have more open_buckets than we used to, and the reserves work
       better, so we shouldn't need to use BTREE_INSERT_RESERVE just because
       we're holding open_buckets pinned anymore.
    
     - We have the btree key cache for updates to the alloc btree, meaning
       we no longer need the btree reserve to ensure the allocator can make
       forward progress.
    
    This means that we should only need a reserve for btree updates to
    ensure that copygc can make forward progress.
    
    Since it's now just for copygc, we can also fold RESERVE_BTREE into
    RESERVE_MOVINGGC (the allocator's freelist reserve).
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    3187aa8d
sysfs.c 24.9 KB