Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.6] Track btrfs patches #31

Closed
wants to merge 5 commits into from
Closed

Commits on Sep 9, 2024

  1. btrfs: add flags to give an hint to the chunk allocator

    Add the following flags to give an hint about which chunk should be
    allocated in which a disk.
    The following flags are created:
    
    - BTRFS_DEV_ALLOCATION_PREFERRED_DATA
      preferred data chunk, but metadata chunk allowed
    - BTRFS_DEV_ALLOCATION_PREFERRED_METADATA
      preferred metadata chunk, but data chunk allowed
    - BTRFS_DEV_ALLOCATION_METADATA_ONLY
      only metadata chunk allowed
    - BTRFS_DEV_ALLOCATION_DATA_ONLY
      only data chunk allowed
    
    Signed-off-by: Goffredo Baroncelli <[email protected]>
    kreijack authored and kakra committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    e7913f2 View commit details
    Browse the repository at this point in the history
  2. btrfs: export dev_item.type in /sys/fs/btrfs/<uuid>/devinfo/<devid>/type

    Signed-off-by: Goffredo Baroncelli <[email protected]>
    kreijack authored and kakra committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    e537633 View commit details
    Browse the repository at this point in the history
  3. btrfs: change the DEV_ITEM 'type' field via sysfs

    Signed-off-by: Kai Krakow <[email protected]>
    kreijack authored and kakra committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    e438af3 View commit details
    Browse the repository at this point in the history
  4. btrfs: add allocator_hint mode

    When this mode is enabled, the chunk allocation policy is modified as
    follow.
    
    Each disk may have a different tag:
    - BTRFS_DEV_ALLOCATION_PREFERRED_METADATA
    - BTRFS_DEV_ALLOCATION_METADATA_ONLY
    - BTRFS_DEV_ALLOCATION_DATA_ONLY
    - BTRFS_DEV_ALLOCATION_PREFERRED_DATA (default)
    
    Where:
    - ALLOCATION_PREFERRED_X means that it is preferred to use this disk for
    the X chunk type (the other type may be allowed when the space is low)
    - ALLOCATION_X_ONLY means that it is used *only* for the X chunk type.
    This means also that it is a preferred choice.
    
    Each time the allocator allocates a chunk of type X , first it takes the
    disks tagged as ALLOCATION_X_ONLY or ALLOCATION_PREFERRED_X; if the space
    is not enough, it uses also the disks tagged as ALLOCATION_METADATA_ONLY;
    if the space is not enough, it uses also the other disks, with the
    exception of the one marked as ALLOCATION_PREFERRED_Y, where Y the other
    type of chunk (i.e. not X).
    
    Signed-off-by: Goffredo Baroncelli <[email protected]>
    kreijack authored and kakra committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    0e46a86 View commit details
    Browse the repository at this point in the history
  5. btrfs: add allocator_hint for no allocation preferred

    This is useful where you want to prevent new allocations of chunks on a
    disk which is going to removed from the pool anyways, e.g. due to bad
    blocks or because it's slow.
    
    Signed-off-by: Kai Krakow <[email protected]>
    kakra committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    186029a View commit details
    Browse the repository at this point in the history