Skip to content
  1. Jun 30, 2024
  2. Jun 11, 2024
  3. May 28, 2024
  4. May 09, 2024
  5. Apr 18, 2024
  6. Apr 15, 2024
    • Kent Overstreet's avatar
      bcachefs: bch_member.btree_allocated_bitmap · 27c15ed2
      Kent Overstreet authored
      
      
      This adds a small (64 bit) per-device bitmap that tracks ranges that
      have btree nodes, for accelerating btree node scan if it is ever needed.
      
      - New helpers, bch2_dev_btree_bitmap_marked() and
        bch2_dev_bitmap_mark(), for checking and updating the bitmap
      
      - Interior btree update path updates the bitmaps when required
      
      - The check_allocations pass has a new fsck_err check,
        btree_bitmap_not_marked
      
      - New on disk format version, mi_btree_mitmap, which indicates the new
        bitmap is present
      
      - Upgrade table lists the required recovery pass and expected fsck error
      
      - Btree node scan uses the bitmap to skip ranges if we're on the new
        version
      
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      27c15ed2
  7. Apr 09, 2024
  8. Apr 04, 2024
  9. Apr 01, 2024
    • Kent Overstreet's avatar
      bcachefs: Split out recovery_passes.c · d2554263
      Kent Overstreet authored
      
      
      We've grown a fair amount of code for managing recovery passes; tracking
      which ones we're running, which ones need to be run, and flagging in the
      superblock which ones need to be run on the next recovery.
      
      So it's worth splitting out into its own file, this code is pretty
      different from the code in recovery.c.
      
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      d2554263
    • Kent Overstreet's avatar
      bcachefs: Kill bch2_bkey_ptr_data_type() · 47d2080e
      Kent Overstreet authored
      
      
      Remove some duplication, and inconsistency between check_fix_ptrs and
      the main ptr marking paths
      
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      47d2080e
    • Kent Overstreet's avatar
    • Kent Overstreet's avatar
      bcachefs: Improved topology repair checks · 79032b07
      Kent Overstreet authored
      
      
      Consolidate bch2_gc_check_topology() and btree_node_interior_verify(),
      and replace them with an improved version,
      bch2_btree_node_check_topology().
      
      This checks that children of an interior node correctly span the full
      range of the parent node with no overlaps.
      
      Also, ensure that topology repairs at runtime are always a fatal error;
      in particular, this adds a check in btree_iter_down() - if we don't find
      a key while walking down the btree that's indicative of a topology error
      and should be flagged as such, not a null ptr deref.
      
      Some checks in btree_update_interior.c remaining BUG_ONS(), because we
      already checked the node for topology errors when starting the update,
      and the assertions indicate that we _just_ corrupted the btree node -
      i.e. the problem can't be that existing on disk corruption, they
      indicate an actual algorithmic bug.
      
      In the future, we'll be annotating the fsck errors list with which
      recovery pass corrects them; the open coded "run explicit recovery pass
      or fatal error" in bch2_btree_node_check_topology() will in the future
      be done for every fsck_err() call.
      
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      79032b07
  10. Mar 18, 2024
  11. Mar 14, 2024
Loading