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.1] Track btrfs patches #26

Closed
wants to merge 4 commits into from
Closed

Commits on Dec 18, 2022

  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 Dec 18, 2022
    Configuration menu
    Copy the full SHA
    5a784f3 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 Dec 18, 2022
    Configuration menu
    Copy the full SHA
    9d6cd46 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 Dec 18, 2022
    Configuration menu
    Copy the full SHA
    27fe50a 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 Dec 18, 2022
    Configuration menu
    Copy the full SHA
    3eb2fd0 View commit details
    Browse the repository at this point in the history