mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-17 18:26:55 +00:00
btrfs-progs: reorder single to be first in multiple bg list
Move 'single' as the first in the list of the multiple block groups, as it's the default block group and the simplest. Example output: WARNING: data -> [single, raid1], metadata -> [single], system -> [single] WARNING: data+metadata -> [single], system -> [raid1] Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
297df4f01a
commit
047dc287ec
@ -1739,6 +1739,9 @@ static char *sprint_profiles(u64 profiles)
|
||||
if (!ptr)
|
||||
return NULL;
|
||||
|
||||
if (profiles & BTRFS_AVAIL_ALLOC_BIT_SINGLE)
|
||||
strcat(ptr, btrfs_raid_array[BTRFS_RAID_SINGLE].raid_name);
|
||||
|
||||
for (i = 0; i < BTRFS_NR_RAID_TYPES; i++) {
|
||||
if (!(btrfs_raid_array[i].bg_flag & profiles))
|
||||
continue;
|
||||
@ -1747,11 +1750,6 @@ static char *sprint_profiles(u64 profiles)
|
||||
strcat(ptr, ", ");
|
||||
strcat(ptr, btrfs_raid_array[i].raid_name);
|
||||
}
|
||||
if (profiles & BTRFS_AVAIL_ALLOC_BIT_SINGLE) {
|
||||
if (ptr[0])
|
||||
strcat(ptr, ", ");
|
||||
strcat(ptr, btrfs_raid_array[BTRFS_RAID_SINGLE].raid_name);
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user