lkml.org 
[lkml]   [2004]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cciss update [2/2] fixes for Steeleye Lifekeeper
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.069 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site