rdev->in_sync = 0; 
clear_bit(In_sync, &rdev->flags); 
static int hot_add_disk(mddev_t * mddev, dev_t dev){	char b[BDEVNAME_SIZE];	int err;	unsigned int size;	mdk_rdev_t *rdev;	if (!mddev->pers)		return -ENODEV;	if (mddev->major_version != 0) {		printk(KERN_WARNING "%s: HOT_ADD may only be used with"			" version-0 superblocks.\n",			mdname(mddev));		return -EINVAL;	}	if (!mddev->pers->hot_add_disk) {		printk(KERN_WARNING 			"%s: personality does not support diskops!\n",			mdname(mddev));		return -EINVAL;	}	rdev = md_import_device (dev, -1, 0);	if (IS_ERR(rdev)) {		printk(KERN_WARNING 			"md: error, md_import_device() returned %ld\n",			PTR_ERR(rdev));		return -EINVAL;	}	if (mddev->persistent)		rdev->sb_offset = calc_dev_sboffset(rdev->bdev);	else		rdev->sb_offset =			rdev->bdev->bd_inode->i_size >> BLOCK_SIZE_BITS;	size = calc_dev_size(rdev, mddev->chunk_size);	rdev->size = size;	if (size < mddev->size) {		printk(KERN_WARNING 			"%s: disk size %llu blocks < array size %llu\n",			mdname(mddev), (unsigned long long)size,			(unsigned long long)mddev->size);		err = -ENOSPC;		goto abort_export;	}	if (rdev->faulty) {		printk(KERN_WARNING 			"md: can not hot-add faulty %s disk to %s!\n",			bdevname(rdev->bdev,b), mdname(mddev));		err = -EINVAL;		goto abort_export;	}	rdev->in_sync = 0;	rdev->desc_nr = -1;	bind_rdev_to_array(rdev, mddev);	/*	 * The rest should better be atomic, we can have disk failures	 * noticed in interrupt contexts ...	 */	if (rdev->desc_nr == mddev->max_disks) {		printk(KERN_WARNING "%s: can not hot-add to full array!\n",			mdname(mddev));		err = -EBUSY;		goto abort_unbind_export;	}	rdev->raid_disk = -1;	md_update_sb(mddev);	/*	 * Kick recovery, maybe this spare has to be added to the	 * array immediately.	 */	set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);	md_wakeup_thread(mddev->thread);	return 0;abort_unbind_export:	unbind_rdev_from_array(rdev);abort_export:	export_rdev(rdev);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b2d444d7ad975d555bb919601bcdc0e58975a40e/md.c/buggy/drivers/md/md.c