• Kent Overstreet's avatar
    bcachefs: for_each_btree_key2() · a1783320
    Kent Overstreet authored
    This introduces two new macros for iterating through the btree, with
    transaction restart handling
     - for_each_btree_key2()
     - for_each_btree_key_commit()
    
    Every iteration is now in an implicit transaction, and - as with
    lockrestart_do() and commit_do() - returning -EINTR will cause the
    transaction to be restarted, at the same key.
    
    This patch converts a bunch of code that was open coding this to these
    new macros, saving a substantial amount of code.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    a1783320
fsck.c 55.8 KB