if (conf->strip_zone) kfree(conf->strip_zone); if (conf->devlist) kfree (conf->devlist); 
kfree(conf->strip_zone); kfree(conf->devlist); 
static int raid0_run (mddev_t *mddev){	unsigned  cur=0, i=0, nb_zone;	s64 size;	raid0_conf_t *conf;	mdk_rdev_t *rdev;	struct list_head *tmp;	printk("%s: setting max_sectors to %d, segment boundary to %d\n",	       mdname(mddev),	       mddev->chunk_size >> 9,	       (mddev->chunk_size>>1)-1);	blk_queue_max_sectors(mddev->queue, mddev->chunk_size >> 9);	blk_queue_segment_boundary(mddev->queue, (mddev->chunk_size>>1) - 1);	conf = kmalloc(sizeof (raid0_conf_t), GFP_KERNEL);	if (!conf)		goto out;	mddev->private = (void *)conf; 	conf->strip_zone = NULL;	conf->devlist = NULL;	if (create_strip_zones (mddev)) 		goto out_free_conf;	/* calculate array device size */	mddev->array_size = 0;	ITERATE_RDEV(mddev,rdev,tmp)		mddev->array_size += rdev->size;	printk("raid0 : md_size is %llu blocks.\n", 		(unsigned long long)mddev->array_size);	printk("raid0 : conf->hash_spacing is %llu blocks.\n",		(unsigned long long)conf->hash_spacing);	{#if __GNUC__ < 3		volatile#endif		sector_t s = mddev->array_size;		sector_t space = conf->hash_spacing;		int round;		conf->preshift = 0;		if (sizeof(sector_t) > sizeof(unsigned long)) {			/*shift down space and s so that sector_div will work */			while (space > (sector_t) (~(unsigned long)0)) {				s >>= 1;				space >>= 1;				s += 1; /* force round-up */				conf->preshift++;			}		}		round = sector_div(s, (unsigned long)space) ? 1 : 0;		nb_zone = s + round;	}	printk("raid0 : nb_zone is %d.\n", nb_zone);	printk("raid0 : Allocating %Zd bytes for hash.\n",				nb_zone*sizeof(struct strip_zone*));	conf->hash_table = kmalloc (sizeof (struct strip_zone *)*nb_zone, GFP_KERNEL);	if (!conf->hash_table)		goto out_free_conf;	size = conf->strip_zone[cur].size;	for (i=0; i< nb_zone; i++) {		conf->hash_table[i] = conf->strip_zone + cur;		while (size <= conf->hash_spacing) {			cur++;			size += conf->strip_zone[cur].size;		}		size -= conf->hash_spacing;	}	if (conf->preshift) {		conf->hash_spacing >>= conf->preshift;		/* round hash_spacing up so when we divide by it, we		 * err on the side of too-low, which is safest		 */		conf->hash_spacing++;	}	/* calculate the max read-ahead size.	 * For read-ahead of large files to be effective, we need to	 * readahead at least twice a whole stripe. i.e. number of devices	 * multiplied by chunk size times 2.	 * If an individual device has an ra_pages greater than the	 * chunk size, then we will not drive that device as hard as it	 * wants.  We consider this a configuration error: a larger	 * chunksize should be used in that case.	 */	{		int stripe = mddev->raid_disks * mddev->chunk_size / PAGE_CACHE_SIZE;		if (mddev->queue->backing_dev_info.ra_pages < 2* stripe)			mddev->queue->backing_dev_info.ra_pages = 2* stripe;	}	blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec);	return 0;out_free_conf:	if (conf->strip_zone)		kfree(conf->strip_zone);	if (conf->devlist)		kfree (conf->devlist);	kfree(conf);	mddev->private = NULL;out:	return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/990a8baf568ca1d0ae65e59783ff821794118d07/raid0.c/clean/drivers/md/raid0.c