An error occurred fetching the project authors.
  1. 14 Aug, 2024 1 commit
    • Kent Overstreet's avatar
      bcachefs: bcachefs_metadata_version_disk_accounting_inum · 58474f76
      Kent Overstreet authored
      This adds another disk accounting counter to track usage per inode
      number (any snapshot ID).
      
      This will be used for a couple things:
      
      - It'll give us a way to tell the user how much space a given file ista
        consuming in all snapshots; i.e. how much extra space it's consuming
        due to snapshot versioning.
      
      - It counts number of extents and total size of extents (both in btree
        keyspace sectors and actual disk usage), meaning it gives us average
        extent size: that is, it'll let us cheaply find fragmented files that
        should be defragmented.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      58474f76
  2. 09 Aug, 2024 1 commit
  3. 08 Aug, 2024 1 commit
  4. 14 Jul, 2024 5 commits
    • Kent Overstreet's avatar
      7aa7183e
    • Kent Overstreet's avatar
      bcachefs: Disk space accounting rewrite · 1d16c605
      Kent Overstreet authored
      Main part of the disk accounting rewrite.
      
      This is a wholesale rewrite of the existing disk space accounting, which
      relies on percepu counters that are sharded by journal buffer, and
      rolled up and added to each journal write.
      
      With the new scheme, every set of counters is a distinct key in the
      accounting btree; this fixes scaling limitations of the old scheme,
      where counters took up space in each journal entry and required multiple
      percpu counters.
      
      Now, in memory accounting requires a single set of percpu counters - not
      multiple for each in flight journal buffer - and in the future we'll
      probably also have counters that don't use in memory percpu counters,
      they're not strictly required.
      
      An accounting update is now a normal btree update, using the btree write
      buffer path. At transaction commit time, we apply accounting updates to
      the in memory counters, which are percpu counters indexed in an
      eytzinger tree by the accounting key.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      1d16c605
    • Kent Overstreet's avatar
      bcachefs: KEY_TYPE_accounting · 2744e5c9
      Kent Overstreet authored
      New key type for the disk space accounting rewrite.
      
       - Holds a variable sized array of u64s (may be more than one for
         accounting e.g. compressed and uncompressed size, or buckets and
         sectors for a given data type)
      
       - Updates are deltas, not new versions of the key: this means updates
         to accounting can happen via the btree write buffer, which we'll be
         teaching to accumulate deltas.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      2744e5c9
    • Kent Overstreet's avatar
      bcachefs: metadata version bucket_stripe_sectors · 7773df19
      Kent Overstreet authored
      New on disk format version for bch_alloc->stripe_sectors and
      BCH_DATA_unstriped - accounting for unstriped data in stripe buckets.
      
      Upgrade/downgrade requires regenerating alloc info - but only if erasure
      coding is in use.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      7773df19
    • Kent Overstreet's avatar
      bcachefs: BCH_DATA_unstriped · 2612e291
      Kent Overstreet authored
      Add a new pseudo data type, to track buckets that are members of a
      stripe, but have unstriped data in them.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      2612e291
  5. 20 Jun, 2024 1 commit
    • Kent Overstreet's avatar
      bcachefs: Fix safe errors by default · 33dfafa9
      Kent Overstreet authored
      i.e. the start of automatic self healing:
      
      If errors=continue or fix_safe, we now automatically fix simple errors
      without user intervention.
      
      New error action option: fix_safe
      
      This replaces the existing errors=ro option, which gets a new slot, i.e.
      existing errors=ro users now get errors=fix_safe.
      
      This is currently only enabled for a limited set of errors - initially
      just disk accounting; errors we would never not want to fix, and we
      don't want to require user intervention (i.e. to make sure a bug report
      gets filed).
      
      Errors will still be counted in the superblock, so we (developers) will
      still know they've been occuring if a bug report gets filed (as bug
      reports typically include the errors superblock section).
      
      Eventually we'll be enabling this for a much wider set of errors, after
      we've done thorough error injection testing.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      33dfafa9
  6. 19 Jun, 2024 2 commits
  7. 28 May, 2024 6 commits
  8. 20 May, 2024 1 commit
  9. 08 May, 2024 2 commits
  10. 06 May, 2024 2 commits
  11. 17 Apr, 2024 1 commit
  12. 15 Apr, 2024 1 commit
    • 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
  13. 14 Apr, 2024 1 commit
  14. 09 Apr, 2024 1 commit
  15. 03 Apr, 2024 1 commit
  16. 14 Mar, 2024 3 commits
    • Thomas Bertschinger's avatar
      bcachefs: omit alignment attribute on big endian struct bkey · b07ce726
      Thomas Bertschinger authored
      This is needed for building Rust bindings on big endian architectures
      like s390x. Currently this is only done in userspace, but it might
      happen in-kernel in the future. When creating a Rust binding for struct
      bkey, the "packed" attribute is needed to get a type with the correct
      member offsets in the big endian case. However, rustc does not allow
      types to have both a "packed" and "align" attribute. Thus, in order to
      get a Rust type compatible with the C type, we must omit the "aligned"
      attribute in C.
      
      This does not affect the struct's size or member offsets, only its
      toplevel alignment, which should be an acceptable impact.
      
      The little endian version can have the "align" attribute because the
      "packed" attr is redundant, and rust-bindgen will omit the "packed" attr
      when an "align" attr is present and it can do so without changing a
      type's layout
      Signed-off-by: default avatarThomas Bertschinger <tahbertschinger@gmail.com>
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      b07ce726
    • Kent Overstreet's avatar
      bcachefs: BTREE_ID_subvolume_children · b26d7914
      Kent Overstreet authored
      Add a btree to record a parent -> child subvolume relationships,
      according to the filesystem heirarchy.
      
      The subvolume_children btree is a bitset btree: if a bit is set at pos
      p, that means p.offset is a child of subvolume p.inode.
      
      This will be used for efficiently listing subvolumes, as well as
      recursive deletion.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      b26d7914
    • Kent Overstreet's avatar
      bcachefs: bch_subvolume::fs_path_parent · b8628a25
      Kent Overstreet authored
      Record the filesystem path heirarchy for subvolumes in bch_subvolume
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      b8628a25
  17. 10 Mar, 2024 1 commit
  18. 21 Jan, 2024 9 commits