[parted-devel] [PATCH] Properly sync partitions with operating system

Karel Zak kzak at redhat.com
Thu Feb 19 16:11:25 UTC 2009


On Thu, Feb 19, 2009 at 01:55:33PM +0100, Joel Granados wrote:
> On Thu, Feb 19, 2009 at 12:28:14PM +0100, Petr Uzel wrote:
> > On Wed, Feb 18, 2009 at 10:01:11PM +0100, Joel Granados Moreno wrote:
> > > +/* Maximum number of partitions supported by linux. */
> > > +#define MAX_NUM_PARTS		16
> > 

 I think hardcoded Linux limit is 256 for disks with extended
 partitions, otherwise the limit depends on maximal device minor
 number (traditional limits are IDE 63 and SCSI 15). For more
 details see Linux kernel include/linux/genhd.h and
 Documentation/devices.txt.

> > I'd suggest to increase this to 64

 The limit in fdisk(8) is 60 ...don't ask me why :-)

> > > +static int
> > > +gpt_get_max_partitoin_count(const PedDisk *disk)
> > > +{
> > > +	return 16;
> > > +}
> > > +
> > 
> > Are you sure about this? I think GPT has no such on the number of
> > partitions.
> > 
> 
> To be honest, have to do a background check on all the hardcoded number
> that represent maximum amount of partitions.  If someone has a better
> value, pls be my guest.

 The right number according to MS is 128, see:
 http://www.microsoft.com/whdc/device/storage/GPT-on-x64.mspx
 http://technet.microsoft.com/en-us/library/cc739412.aspx

 Anyway.. all sane people who need so many partitions use some
 logical volume/disk manager (include Windows world).

    Karel

-- 
 Karel Zak  <kzak at redhat.com>



More information about the parted-devel mailing list