On Mon, Oct 16, 2023 at 01:02:07AM +0000, Klemens Nanni wrote:
> The current check implies one could use, e.g. SWAP or MSDOS partitions
> as softraid(4) chunks, but sys/dev/softraid.c always expects FS_RAID,
> thus using chunks with different partition types is not possible:
> 
>       # vmctl create -s100M disk.img
>       # vnd=`vnconfig disk.img`
>       # echo 'swap *' | disklabel -wAT- vnd0
> 
>       # disklabel $vnd | grep swap
>         a:           204800                0    swap
>       # bioctl -c c -l ${vnd}a softraid0
>       softraid0: invalid metadata format
> 
> Correct the check.
> I don't expect this to break anything.
> amd64 biosboot boots off standard RAID 'a' as before.
> 
> Feedback? Objection? OK?

PS: the last remaining architecture with softraid boot support has it right.
    arch/sparc64/stand/ofwboot/softraid_sparc64.c:srprobe()

                for (i = 0; i < MAXPARTITIONS; i++) {
                        pp = &dip->disklabel.d_partitions[i];
                        if (pp->p_fstype != FS_RAID || pp->p_size == 0)
                                continue;

Reply via email to