• Kent Overstreet's avatar
    bcachefs: Kill bkey_type_successor · 39fb2983
    Kent Overstreet authored
    Previously, BTREE_ID_INODES was special - inodes were indexed by the
    inode field, which meant the offset field of struct bpos wasn't used,
    which led to special cases in e.g. the btree iterator code.
    
    Now, inodes in the inodes btree are indexed by the offset field.
    
    Also: prevously min_key was special for extents btrees, min_key for
    extents would equal max_key for the previous node. Now, min_key =
    bkey_successor() of the previous node, same as non extent btrees.
    
    This means we can completely get rid of
    btree_type_sucessor/predecessor.
    
    Also make some improvements to the metadata IO validate/compat code.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    39fb2983
extents.c 30.9 KB