[yast-commit] r60290 - in /branches/SuSE-Code-11-SP1-Branch/bootloader: VERSION package/yast2-bootloader.changes src/routines/lilolike.ycp
Author: juhliarik Date: Fri Jan 8 14:03:26 2010 New Revision: 60290 URL: http://svn.opensuse.org/viewcvs/yast?rev=60290&view=rev Log: added fix for worng Intel MD RAID -> fix data in device.map Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/VERSION branches/SuSE-Code-11-SP1-Branch/bootloader/package/yast2-bootloader.changes branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/bootloader/VERSION?rev=60290&r1=60289&r2=60290&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/bootloader/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/bootloader/VERSION Fri Jan 8 14:03:26 2010 @@ -1 +1 @@ -2.17.65 +2.17.66 Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/package/yast2-bootloader.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/bootloader/package/yast2-bootloader.changes?rev=60290&r1=60289&r2=60290&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/bootloader/package/yast2-bootloader.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/bootloader/package/yast2-bootloader.changes Fri Jan 8 14:03:26 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Jan 7 14:57:34 CET 2010 - juhliarik@suse.cz + +- added fix for data in device.map if MD RAID from Intel is used + (bnc#568837) +- 2.17.66 + +------------------------------------------------------------------- Fri Dec 4 12:05:28 CET 2009 - juhliarik@suse.cz - added patch for KMS (bnc#560423) -> disable KMS for failsafe Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp?rev=60290&r1=60289&r2=60290&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp Fri Jan 8 14:03:26 2010 @@ -1114,6 +1114,45 @@ return ret; } +/** bnc#568837 wrong data in device map + * Function check if disk is in list of devices + * @param string disk + * @param list<string> list of devices + * @return true if success + */ + +boolean isDiskInList (string disk, list<string> devices) +{ + boolean ret = false; + foreach(string dev, devices, + { + if (dev == disk) + { + ret = true; + break; + } + }); + return ret; +} + +/** bnc#568837 wrong data in device map + * Check if disk is in MDRaid it means completed disk is used in RAID + * @param disk (/dev/sda) + * @param tm - target map + * @return - true if disk (not only part of disk) is in MDRAID + */ +boolean isDiskInMDRaid (string disk, map<string,map> tm) +{ + boolean ret = false; + foreach( string dev, map d_info, tm, + { + if (d_info["type"]:nil == `CT_MDPART) + ret = isDiskInList(disk, d_info["devices"]:[]); + if (ret) + break; + }); + return ret; +} /*** helper functions END ***/ @@ -1148,10 +1187,6 @@ else targetMap = (map<string,map>)Storage::GetTargetMap(); - // filter out members of BIOS RAIDs and multipath devices - targetMap = filter (string k, map v, targetMap, { - return v["used_by_type"]:nil != `UB_DMRAID && v["used_by_type"]:nil != `UB_DMMULTIPATH; - }); // filter out non-disk devices targetMap = filter (string k, map v, targetMap, { return v["type"]:`CT_UNKNOWN==`CT_DMRAID || v["type"]:`CT_UNKNOWN==`CT_DISK @@ -1159,6 +1194,13 @@ (v["type"]:`CT_UNKNOWN==`CT_MDPART && checkMDRaidDevices(v["devices"]:[], targetMap)); }); + // bnc#568837 wrong data in device map + // filter out members of BIOS RAIDs and multipath devices + targetMap = filter (string k, map v, targetMap, { + return v["used_by_type"]:nil != `UB_DMRAID && v["used_by_type"]:nil != `UB_DMMULTIPATH&& + ((v["used_by_type"]:nil == `UB_MDPART) ? (!isDiskInMDRaid(k,targetMap)):true); + }); + y2milestone ("Target map: %1", targetMap); // add devices with known bios_id -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
juhliarik@svn.opensuse.org