Messages in this thread | | | Date | Mon, 18 Oct 2004 11:35:32 -0500 | From | mikem <> | Subject | Re: 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/
| |