public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Philippe De Muyter <phdm@macqel.be>
Cc: Karel Zak <kzak@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] Add aix lvm partitions support files
Date: Tue, 30 Apr 2013 08:41:52 +0200	[thread overview]
Message-ID: <20130430064152.GK9563@kernel.dk> (raw)
In-Reply-To: <20130429153450.GA25581@frolo.macqel>

On Mon, Apr 29 2013, Philippe De Muyter wrote:
> Hi Karel
> 
> On Mon, Apr 29, 2013 at 02:36:51PM +0200, Karel Zak wrote:
> > On Mon, Apr 29, 2013 at 01:40:41PM +0200, Philippe De Muyter wrote:
> > > > why not memset(pps_found, ....)? I also see magical constant 16
> > > 
> > > Actually 16 is the maximum partition count allowed in a disk by linux,
> > > or should it be 15 ?  Is there already a constant for that ?
> > > The AIX disk I tested with had only :) 11 partitions.
> > 
> > I don't think it's correct to expect any hardcoded limit. 
> >  
> > The struct parsed_partitions->parts is allocated according to
> > disk_max_parts() where the limit depends on number of minor numbers or
> > it's DISK_MAX_PARTS (=256).
> > 
> > There is no problem to create disk with many partitions:
> > 
> >  # modprobe scsi_debug dev_size_mb=300
> >  # (echo -e 'g\n'; for i in {1..100}; do echo -e "n\n\n\n+1M"; done; \
> >     echo -e 'w\nq\n') | fdisk /dev/sdb
> > 
> >  # lsblk -n /dev/sdb | wc -l
> >  101
> 
> how are they named then ?
> 
> on my system (a 2.6.24 kernel which is the last one that support my
> powerpc PReP machine because PReP support got removed with the merge
> of /arch/ppc and /arch/powerpc :( ), I get :
> 
> root:~# ls -l /dev/sd[ab]*
> brw-r----- 1 root disk 8,  0 Apr 25 22:22 /dev/sda
> brw-r----- 1 root disk 8, 10 Apr 25 22:22 /dev/sda10
> brw-r----- 1 root disk 8, 11 Apr 25 22:22 /dev/sda11
> brw-r----- 1 root disk 8,  3 Apr 25 22:22 /dev/sda3
> brw-r----- 1 root disk 8,  4 Apr 25 22:22 /dev/sda4
> brw-r----- 1 root disk 8,  5 Apr 25 22:22 /dev/sda5
> brw-r----- 1 root disk 8,  6 Apr 25 22:22 /dev/sda6
> brw-r----- 1 root disk 8,  7 Apr 25 22:22 /dev/sda7
> brw-r----- 1 root disk 8,  8 Apr 25 22:22 /dev/sda8
> brw-r----- 1 root disk 8,  9 Apr 25 22:22 /dev/sda9
> brw-r----- 1 root disk 8, 16 Apr 25 22:22 /dev/sdb
> brw-r----- 1 root disk 8, 26 Apr 25 22:22 /dev/sdb10
> brw-r----- 1 root disk 8, 27 Apr 25 22:22 /dev/sdb11
> brw-r----- 1 root disk 8, 19 Apr 25 22:22 /dev/sdb3
> brw-r----- 1 root disk 8, 20 Apr 25 22:22 /dev/sdb4
> brw-r----- 1 root disk 8, 21 Apr 25 22:22 /dev/sdb5
> brw-r----- 1 root disk 8, 22 Apr 25 22:22 /dev/sdb6
> brw-r----- 1 root disk 8, 23 Apr 25 22:22 /dev/sdb7
> brw-r----- 1 root disk 8, 24 Apr 25 22:22 /dev/sdb8
> brw-r----- 1 root disk 8, 25 Apr 25 22:22 /dev/sdb9
> root:~#
> 
> so sda is 8,0 and sdb is 8,16
> 
> and if, while discovering partitions of /dev/sda, I try to make a
> partition 16 or higher, it is silently discarded by 'put_partition'.
> 
> Is that changed ?

That's a set limitation of sd, it does not apply to other devices. The
legacy IDE code used 64 for max partitions, for instance. So Karel is
right, you should not make any assumptions about the max number of
partitions, it is driver dependent.

-- 
Jens Axboe


  reply	other threads:[~2013-04-30  6:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 21:10 [RFC PATCH 0/5] Add aix lvm partitions support Philippe De Muyter
2013-04-25 21:10 ` [PATCH 1/5] partitions/msdos.c: end-of-line whitespace and semicolon cleanup Philippe De Muyter
2013-04-25 21:10 ` [PATCH 2/5] Add aix lvm partitions support files Philippe De Muyter
2013-04-29  9:37   ` Karel Zak
2013-04-29 11:40     ` Philippe De Muyter
2013-04-29 12:36       ` Karel Zak
2013-04-29 15:34         ` Philippe De Muyter
2013-04-30  6:41           ` Jens Axboe [this message]
2013-04-30  6:45             ` Philippe De Muyter
2013-04-29 21:50       ` Philippe De Muyter
2013-04-30  7:08         ` Philippe De Muyter
2013-04-30  7:18           ` Philippe De Muyter
2013-05-01  5:35             ` Philippe De Muyter
2013-04-25 21:10 ` [PATCH 3/5] partitions/msdos: enumerate also AIX LVM partitions Philippe De Muyter
2013-04-25 21:10 ` [PATCH 4/5] partitions/Makefile: compile aix.c if configured Philippe De Muyter
2013-04-25 21:10 ` [PATCH 5/5] partitions/Kconfig: add the AIX_PARTITION entry Philippe De Muyter
  -- strict thread matches above, loose matches on Subject: below --
2013-04-29 21:18 [PATCH v2 0/5] partitions: add AIX LVM support Philippe De Muyter
2013-04-29 21:18 ` [PATCH 2/5] Add aix lvm partitions support files Philippe De Muyter
2013-05-20 23:39   ` Andrew Morton
2013-05-21  7:27     ` Philippe De Muyter
2013-05-24 10:04       ` Christoph Hellwig
2013-05-24 10:58         ` Philippe De Muyter
2013-08-12 11:52           ` Christoph Hellwig
2013-08-12 12:21             ` Alasdair G Kergon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130430064152.GK9563@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phdm@macqel.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox