mddev->chunk_size    != info->chunk_size    ) 
mddev->chunk_size    != info->chunk_size    || /* ignore bottom 8 bits of state, and allow SB_BITMAP_PRESENT to change */ ((state^info->state) & 0xfffffe00) ) 
static int update_array_info(mddev_t *mddev, mdu_array_info_t *info){	int rv = 0;	int cnt = 0;	if (mddev->major_version != info->major_version ||	    mddev->minor_version != info->minor_version ||/*	    mddev->patch_version != info->patch_version || */	    mddev->ctime         != info->ctime         ||	    mddev->level         != info->level         ||/*	    mddev->layout        != info->layout        || */	    !mddev->persistent	 != info->not_persistent||	    mddev->chunk_size    != info->chunk_size    )		return -EINVAL;	/* Check there is only one change */	if (mddev->size != info->size) cnt++;	if (mddev->raid_disks != info->raid_disks) cnt++;	if (mddev->layout != info->layout) cnt++;	if (cnt == 0) return 0;	if (cnt > 1) return -EINVAL;	if (mddev->layout != info->layout) {		/* Change layout		 * we don't need to do anything at the md level, the		 * personality will take care of it all.		 */		if (mddev->pers->reconfig == NULL)			return -EINVAL;		else			return mddev->pers->reconfig(mddev, info->layout, -1);	}	if (mddev->size != info->size) {		mdk_rdev_t * rdev;		struct list_head *tmp;		if (mddev->pers->resize == NULL)			return -EINVAL;		/* The "size" is the amount of each device that is used.		 * This can only make sense for arrays with redundancy.		 * linear and raid0 always use whatever space is available		 * We can only consider changing the size if no resync		 * or reconstruction is happening, and if the new size		 * is acceptable. It must fit before the sb_offset or,		 * if that is <data_offset, it must fit before the		 * size of each device.		 * If size is zero, we find the largest size that fits.		 */		if (mddev->sync_thread)			return -EBUSY;		ITERATE_RDEV(mddev,rdev,tmp) {			sector_t avail;			int fit = (info->size == 0);			if (rdev->sb_offset > rdev->data_offset)				avail = (rdev->sb_offset*2) - rdev->data_offset;			else				avail = get_capacity(rdev->bdev->bd_disk)					- rdev->data_offset;			if (fit && (info->size == 0 || info->size > avail/2))				info->size = avail/2;			if (avail < ((sector_t)info->size << 1))				return -ENOSPC;		}		rv = mddev->pers->resize(mddev, (sector_t)info->size *2);		if (!rv) {			struct block_device *bdev;			bdev = bdget_disk(mddev->gendisk, 0);			if (bdev) {				down(&bdev->bd_inode->i_sem);				i_size_write(bdev->bd_inode, mddev->array_size << 10);				up(&bdev->bd_inode->i_sem);				bdput(bdev);			}		}	}	if (mddev->raid_disks    != info->raid_disks) {		/* change the number of raid disks */		if (mddev->pers->reshape == NULL)			return -EINVAL;		if (info->raid_disks <= 0 ||		    info->raid_disks >= mddev->max_disks)			return -EINVAL;		if (mddev->sync_thread)			return -EBUSY;		rv = mddev->pers->reshape(mddev, info->raid_disks);		if (!rv) {			struct block_device *bdev;			bdev = bdget_disk(mddev->gendisk, 0);			if (bdev) {				down(&bdev->bd_inode->i_sem);				i_size_write(bdev->bd_inode, mddev->array_size << 10);				up(&bdev->bd_inode->i_sem);				bdput(bdev);			}		}	}	md_update_sb(mddev);	return rv;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/36fa30636fb84b209210299684e1be66d9e58217/md.c/buggy/drivers/md/md.c