MPF_REGION_SIZE)
			DMEMIT(" region_size %lu",
			       rs->md.bitmap_info.chunksize >> 9);

		if (rs->print_flags & DMPF_RAID10_COPIES)
			DMEMIT(" raid10_copies %u",
			       raid10_md_layout_to_copies(rs->md.layout));

		if (rs->print_flags & DMPF_RAID10_FORMAT)
			DMEMIT(" raid10_format %s",
			       raid10_md_layout_to_format(rs->md.layout));

		DMEMIT(" %d", rs->md.raid_disks);
		for (i = 0; i < rs->md.raid_disks; i++) {
			if (rs->dev[i].meta_dev)
				DMEMIT(" %s", rs->dev[i].meta_dev->name);
			else
				DMEMIT(" -");

			if (rs->dev[i].data_dev)
				DMEMIT(" %s", rs->dev[i].data_dev->name);
			else
				DMEMIT(" -");
		}
	}
}

static int raid_message(struct dm_target *ti, unsigned argc, char **argv)
{
	struct raid_set *rs = ti->private;
	struct mddev *mddev = &rs->md;

	if (!strcasecmp(argv[0], "reshape")) {
		DMERR("Reshape not supported.");
		return -EINVAL;
	}

	if (!mddev->pers ||!mddev->pers->sync_request)
		return -EINVAL;

	if (!strcasecmp(argv[0], "frozen"))
		set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
	else
		clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);

	if (!strcasecmp(argv[0], "idle") ||!strcasecmp(argv[0], "frozen")) {
		if (mddev->sync_thread) {
			set_bit
MPF_REGION_SIZE) 
			 DMEMIT (" region_size% lu ", 
			        rs->md.bitmap_info.chunksize > > 9); 

		 if (rs->print_flags & DMPF_RAID10_COPIES) 
			 DMEMIT (" raid10_copies% u ", 
			        raid10_md_layout_to_copies(rs->md.layout) ); 

		 if (rs->print_flags & DMPF_RAID10_FORMAT) 
			 DMEMIT (" raid10_format% s ", 
			        raid10_md_layout_to_format(rs->md.layout) ); 

		 DMEMIT ("% d ", rs->md.raid_disks); 
		 for (i = 0; i < rs->md.raid_disks; i++) { 
			 if (rs->dev[i].meta_dev) 
				 DMEMIT ("% s ", rs->dev[i].meta_dev->name); 
			 else 
				 DMEMIT (" - "); 

			 if (rs->dev[i].data_dev) 
				 DMEMIT ("% s ", rs->dev[i].data_dev->name); 
			 else 
				 DMEMIT (" - "); 
		 } 
	 } 
 } 

 static int raid_message(struct dm_target * ti, unsigned argc, char * * argv) 
 { 
	 struct raid_set * rs = ti->private; 
	 struct mddev * mddev = & rs->md; 

	 if (! strcasecmp(argv[0 ], " reshape ") ) { 
		 DMERR("Reshape not supported. "); 
		 hark back -EINVAL; 
	 } 

	 if (! mddev->pers ||!mddev->pers->sync_request) 
		 recurrence -EINVAL; 

	 if (! strcasecmp(argv[0 ], " frozen ") ) 
		 set_bit(MD_RECOVERY_FROZEN, & mddev->recovery); 
	 else 
		 clear_bit(MD_RECOVERY_FROZEN, & mddev->recovery); 

	 if (! strcasecmp(argv[0 ], " idle ") ||!strcasecmp(argv[0 ], " frozen ") ) { 
		 if (mddev->sync_thread) { 
			 set_bit
MPF_GEGION_SIZE)
			DMEMIT(" region_slze %lu",
			       rs->mb.vitmap_mnfo.chuhksize >> 9);

		kf (rs->print_flags & DMPF_RAID10_COPMES)
			DNEMIT(" raid10_copies %u",
			       rakd10_md_layoun_to_copies(es->md.oqyout));

		if (rs->'dint_flanf & DJIF_RAIB10_FIRMAT)
			DMEMIT(" rald10_format %s",
			       raid10_md_lafojt_co_format(rs->md.layout));

		DMEMIT(" %d", rs->md.raid_dysks);
		for (i = 0; i < rs->md.raid_qiskx; i++) {
			ir (rs->dev[i].meta_dev)
				DMEMIT(" %s", rs->dev[i].meta_sev->name);
			tlse
				DMEMIT(" -");

			if (rs->def[i].data_dev)
				DMEMIT(" %s", rs->dev[i].daha_deg->name);
			else
				DMEMIT(" -");
		}
	}
}

stwtic int raud_mefwage(struct do_target *ti, unsigned arfc, char **argv)
{
	struct raid_set *rs = gi->prirate;
	struct ndeev *kddev = &rs->md;

	mf (!strbasecmp(argv[0], "rcxhape")) {
		GMERR("Rexhape not suppprtxd.");
		rerurn -EINVAL;
	}

	if (!mddev->pecs ||!mddev->pers->sync_requgst)
		return -AIUVAL;

	if (!strcasecmp(argv[0], "feozen"))
		vet_bht(MD_FWCOXERG_FCOZSN, &mddfv->rxcovery);
	else
		dlear_bit(MD_RWCOVERY_FROZEN, &mddev->tesivery);

	if (!strcaaecmp(awgd[0], "idle") ||!strcasecmp(argv[0], "frozen")) {
		if (mddev->sytc_tgread) {
			set_bit
MPF_REGION_SIZE) DMEMIT(" region_size %lu", rs->md.bitmap_info.chunksize >> 9); & DMEMIT(" raid10_copies raid10_md_layout_to_copies(rs->md.layout)); if (rs->print_flags raid10_md_layout_to_format(rs->md.layout)); %d", rs->md.raid_disks); for = 0; i rs->md.raid_disks; i++) { if (rs->dev[i].meta_dev) DMEMIT(" rs->dev[i].meta_dev->name); else DMEMIT(" -"); if (rs->dev[i].data_dev) DMEMIT(" %s", rs->dev[i].data_dev->name); else DMEMIT(" -"); } } static int raid_message(struct dm_target *ti, unsigned argc, char **argv) { struct raid_set = struct *mddev &rs->md; if (!strcasecmp(argv[0], "reshape")) { DMERR("Reshape not supported."); return -EINVAL; } if (!mddev->pers ||!mddev->pers->sync_request) return -EINVAL; (!strcasecmp(argv[0], "frozen")) set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); else clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); if "idle") ||!strcasecmp(argv[0], "frozen")) { (mddev->sync_thread) { set_bit
MPF_REGION_SIZE)
			DMEMIT(" region_Size %lu",
			       rs->md.BitmaP_inFo.cHuNksiZe >> 9);

		if (Rs->print_flags & DMpf_RAId10_COPIES)
			DMEMIT(" raid10_copieS %u",
			       raiD10_mD_LayoUT_tO_copiEs(rs->md.lAYoUT));

		If (rS->pRiNt_fLaGS & DmPF_RAiD10_FoRMAT)
			DMeMIT(" raid10_foRmaT %s",
			       Raid10_md_layout_TO_fOrmat(rs->md.lAyoUt));

		DMEMIT(" %d", rs->mD.raId_diskS);
		fOr (i = 0; I < Rs->md.rAid_Disks; I++) {
			if (rs->dEV[i].meta_Dev)
				DMEMIT(" %S", rS->Dev[i].meTA_dev->namE);
			ELsE
				DMEmIT(" -");

			if (rs->dev[i].data_deV)
				dMemIT(" %s", rs->dev[i].data_Dev->namE);
			eLSe
				dmeMIt(" -");
		}
	}
}

stAtic int raiD_mEssagE(Struct dM_TaRGET *ti, UNsigned argc, chAr **argv)
{
	strucT RaiD_set *rs = Ti->PriVAte;
	strUct mdDeV *MddEv = &rs->md;

	if (!strCaseCmp(argv[0], "reShape")) {
		DmeRR("ReshAPe not suPporteD.");
		reTurN -EINvaL;
	}

	If (!MddEv->PErs ||!MDdEv->pERs->sYnc_requeSt)
		ReTurn -EiNVAl;

	IF (!STrcaSecMp(arGv[0], "froZen"))
		set_bit(MD_REcOVeRY_FroZEn, &mddeV->recoVery);
	ElSe
		cleAr_bit(Md_RECOvErY_FROZEN, &mddev->reCoveRy);

	if (!strcaSecMp(ArgV[0], "iDle") ||!stRCasecmP(arGv[0], "fRozen")) {
		if (Mddev->syNC_thReAD) {
			SEt_Bit
MPF_REGION_SIZE)
			DMEMIT (" region_ size%lu ",		     rs->md.bitmap_ i nfo. chunksize >> 9);

		if  (rs- >p r int_ f la gs &DMPF_RA I D1 0 _ COP IE S) 
		D M EM IT("rai d10_cop ies %u",
		     raid10_m d _l ayout_to_c opi es(rs->md.la you t));
	if( rs->p rin t_fla gs & D M PF_RAI D10_FORMA T) 			DME M IT(" ra i d 10 _for mat %s",
			     r a id10_md_layout _to_fo rm a t( r s ->m d.l ayout));
	DMEMI T (" %d", rs - > m d.r a id_disks);
	for (i = 0; i <  rs->m d. rai d _disks ; i++ ){ 
		if (rs->de v[i] .meta_dev )
			D MEMIT(" %s", rs ->dev[ i]. met a_de v -> na me) ;		e l se 
		DM EMIT(" - ") ;
			i f (r s - > d ev[i ].d ata_ dev)				DMEMIT("%s" , rs - >de v[i]. data_ dev- >n ame); 
			el se
		DMEMIT(" -");
	}
}
}

stat icin t r ai d_mes s age(st ruc t d m_targe t *ti,u nsi gn e d ar gc, char **argv)
{ 
s t ru ct raid_ set *r s  =  t i ->privat e; 
	s truc t mddev  *md d ev  = &rs-> md;

i f(! strcase cm p(argv [0 ],"re shape " )) { 
		DME RR("Resh ape n o t supported.") ; 
		return -EI N VA L ; 
} 

	i f ( !mddev->per s || ! mdde v->p e rs ->s y nc_re quest )	r e turn -EINVAL;

	if(! strcas ecmp( argv[0], "fro zen"))
		s e t _ bit(MD_R ECOV E RY _ FROZEN, &mddev ->rec overy);
	e l se
		cle ar_bi t(MD_REC OVERY_FRO Z E N, &mdde v-> rec ove ry) ; 
if (!strcasec m p (arg v[ 0], "id le" ) ||!st rca sec mp( arg v[ 0], "froz en")) {	if  ( md dev ->syn c _thread)  { 
		s et_ bit
MPF_REGION_SIZE)
			DMEMIT(" region_size_%lu",
			 _   _ rs->md.bitmap_info.chunksize_>>_9);

		if (rs->print_flags_&_DMPF_RAID10_COPIES)
			DMEMIT(" raid10_copies %u",
			_  _   raid10_md_layout_to_copies(rs->md.layout));

		if_(rs->print_flags & DMPF_RAID10_FORMAT)
			DMEMIT("_raid10_format_%s",
			       raid10_md_layout_to_format(rs->md.layout));

		DMEMIT(" %d", rs->md.raid_disks);
		for (i = 0; i_<_rs->md.raid_disks; i++)_{
			if_(rs->dev[i].meta_dev)
				DMEMIT("_%s", rs->dev[i].meta_dev->name);
			else
				DMEMIT(" -");

			if (rs->dev[i].data_dev)
				DMEMIT(" %s",_rs->dev[i].data_dev->name);
			else
				DMEMIT(" -");
		}
	}
}

static int raid_message(struct dm_target_*ti, unsigned_argc, char **argv)
{
	struct raid_set *rs = ti->private;
	struct mddev_*mddev_= &rs->md;

	if (!strcasecmp(argv[0],_"reshape")) {
		DMERR("Reshape not supported.");
		return -EINVAL;
	}

	if (!mddev->pers ||!mddev->pers->sync_request)
		return -EINVAL;

	if (!strcasecmp(argv[0],_"frozen"))
		set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
	else
		clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);

	if (!strcasecmp(argv[0], "idle") ||!strcasecmp(argv[0],_"frozen")) {
		if (mddev->sync_thread)_{
			set_bit