search for: btrfs_degenerate_alloc_profile

Displaying 1 result from an estimated 1 matches for "btrfs_degenerate_alloc_profile".

2012 Jan 17
8
[RFC][PATCH 1/2] Btrfs: try to allocate new chunks with degenerated profile
...lags) return flags; } +/* + * Degenerate the alloc profile: + * RAID10 -> RAID1 -> DUP + * RAID0 -> SINGLE + * + * This is used when there is no enough disk space to do chunk allocation. + * After degenerating the profile, we will try to allocate new chunks again. + */ +static u64 btrfs_degenerate_alloc_profile(u64 flags) +{ + if (flags & BTRFS_BLOCK_GROUP_RAID10) { + flags &= ~BTRFS_BLOCK_GROUP_RAID10; + flags |= BTRFS_BLOCK_GROUP_RAID1; + } else if (flags & BTRFS_BLOCK_GROUP_RAID1) { + flags &= ~BTRFS_BLOCK_GROUP_RAID1; + flags |= BTRFS_BLOCK_GROUP_DUP; + } else if (flags & BTRFS...