Re: Exporting which partitions to md-configure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday January 30, [email protected] wrote:
> Neil Brown wrote:
> > On Monday January 30, [email protected] wrote:
> > 
> >>Any feeling how best to do that?  My current thinking is to export a 
> >>"flags" entry in addition to the current ones, presumably based on 
> >>"struct parsed_partitions->parts[].flags" (fs/partitions/check.h), which 
> >>seems to be what causes md_autodetect_dev() to be called.
> > 
> > I think I would prefer a 'type' attribute in each partition that
> > records the 'type' from the partition table.  This might be more
> > generally useful than just for md.
> > Then your userspace code would have to look for '253' and use just
> > those partitions.
> > 
> 
> What about non-DOS partitions?

Well, grepping through fs/partitions/*.c, the 'flags' thing is set by
 efi.c, msdos.c sgi.c sun.c

Of these, efi compares something against PARTITION_LINUX_RAID_GUID,
and msdos.c, sgi.c and sun. compare something against
LINUX_RAID_PARTITION.

The former would look like
  e6d6d379-f507-44c2-a23c-238f2a3df928
in sysfs (I think);
The latter would look like
  fd
(I suspect).

These are both easily recognisable with no real room for confusion.

And if other partition styles wanted to add support for raid auto
detect, tell them "no". It is perfectly possible and even preferable
to live without autodetect.   We should support legacy usage (those
above) but should discourage any new usage.

NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux