mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mikem <mikem@beardog.cca.cpqcorp.net>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Andrew Morton <akpm@osdl.org>, Jens Axboe <axboe@suse.de>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: cciss update [2/2] fixes for Steeleye Lifekeeper
Date: Mon, 18 Oct 2004 11:35:32 -0500	[thread overview]
Message-ID: <20041018163532.GA24511@beardog.cca.cpqcorp.net> (raw)
In-Reply-To: <1097852716.1718.9.camel@mulgrave>

On Fri, Oct 15, 2004 at 10:05:09AM -0500, James Bottomley wrote:
> On Thu, 2004-10-14 at 13:39, Christoph Hellwig wrote:
> > Such a volume has been configured and set up, and although it's still
> > ugly I'd say it's okay.  But the patch also adds one gendisk per controller
> > even if no volume is set up.
> 
> That's this bit of code:
> 
> @@ -2762,7 +2810,9 @@ static int __devinit cciss_init_one(stru
>                 disk->fops = &cciss_fops;
>                 disk->queue = hba[i]->queue;
>                 disk->private_data = drv;
> -               if( !(drv->nr_blocks))
> +               /* we must register the controller even if no disks
> exist */
> +               /* this is for the online array utilities */
> +               if(!drv->heads && j)
>                         continue;
>                 blk_queue_hardsect_size(hba[i]->queue, drv->block_size);
>                 set_capacity(disk, drv->nr_blocks);
> 
> Mike, is there a way we can only allocate a gendisk when we know there's
> actually a device there (if owned by another controller currently)?
> 
> James

This patch only registers the controller if no logical drives are configured. It will not result in all possible logical drives being added. I added printk's to the driver to show me what I'm registering.
What I see is the controller registers every time, and only drives that are phsically configured are registered. That is true for reserved drives, also.

Thanks,
mikem

  reply	other threads:[~2004-10-18 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-13 21:22 mike.miller
2004-10-14  8:39 ` Christoph Hellwig
2004-10-14 13:48   ` mikem
2004-10-14 14:37   ` James Bottomley
2004-10-14 18:39     ` Christoph Hellwig
2004-10-15 15:05       ` James Bottomley
2004-10-18 16:35         ` mikem [this message]
2004-10-18 19:45           ` James Bottomley
2004-10-20 20:15             ` mikem

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=20041018163532.GA24511@beardog.cca.cpqcorp.net \
    --to=mikem@beardog.cca.cpqcorp.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®