Author: mpatelcz
Date: Thu Nov 19 17:31:49 2009
New Revision: 59639
URL: http://svn.opensuse.org/viewcvs/yast?rev=59639&view=rev
Log:
Fixing Bug 554142.
Modified:
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.h
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.h
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdCo.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.cc?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.cc Thu Nov 19 17:31:49 2009
@@ -31,6 +31,7 @@
#include "y2storage/EtcRaidtab.h"
#include "y2storage/AsciiFile.h"
#include "y2storage/Md.h"
+#include "y2storage/MdPartCo.h"
using namespace std;
using namespace storage;
@@ -41,6 +42,7 @@
mdadmname = prefix+"/etc/mdadm.conf";
mdadm = new AsciiFile( mdadmname );
buildMdadmMap();
+ buildMdadmMap2();
}
EtcRaidtab::~EtcRaidtab()
@@ -77,6 +79,149 @@
updateMdadmFile();
}
+bool EtcRaidtab::updateEntry(const mdconf_info& info)
+{
+ y2mil("Called. UUID="<::iterator i = uuidtab.find( info.md_uuid );
+ if( i != uuidtab.end() )
+ {
+ mdadm->replace( i->second.first,
+ i->second.last - i->second.first + 1,
+ ArrayLine(info) );
+ }
+ else
+ {
+ mdadm->append(ArrayLine(info));
+ }
+ updateMdadmFile();
+ return true;
+}
+
+bool EtcRaidtab::updateContainer(const mdconf_info& info)
+{
+ while( true )
+ {
+ map::iterator i = uuidtab.find( info.md_uuid );
+ map::iterator i2 = uuidtab.find(info.container_info.md_uuid);
+
+ if( i == uuidtab.end() )
+ {
+ // No volume yet.
+ if(i2 == uuidtab.end())
+ {
+ // No container yet.
+ mdadm->append(ContLine(info));
+ updateMdadmFile();
+ return true;
+ }
+ // No Volume, but there is already Container.
+ mdadm->replace( i2->second.first,
+ i2->second.last - i2->second.first + 1,
+ ContLine(info) );
+ updateMdadmFile();
+ return true;
+ }
+ //There is Volume line.
+ if(i2 == uuidtab.end())
+ {
+ //There is Volume line while no Container line.
+ //Insert line and make another iteration.
+ mdadm->insert(i->second.first,ContLine(info));
+ updateMdadmFile();
+ continue;
+ }
+ else
+ {
+ //there is a line for container and for volume.
+ if( i2->second.first >= i->second.first )
+ {
+ // error. Container must be first
+ mdadm->remove(i2->second.first,
+ i2->second.last- i2->second.first + 1);
+ // and make another iteration.
+ updateMdadmFile();
+ continue;
+ }
+ else
+ {
+ //Ok, container is before volume
+ mdadm->replace( i2->second.first,
+ i2->second.last - i2->second.first + 1,
+ ContLine(info) );
+ updateMdadmFile();
+ return true;
+ }
+ }
+ }
+}
+
+string EtcRaidtab::ContLine(const mdconf_info& info)
+{
+ string s = "ARRAY metadata=" + info.container_info.metadata + " UUID=" + info.container_info.md_uuid;
+ return s;
+}
+string EtcRaidtab::ArrayLine(const mdconf_info& info)
+{
+ string line = "ARRAY " + info.fs_name;
+
+ if( info.container_present )
+ {
+ line = line + " container=" + info.container_info.md_uuid;
+ line = line + " member=" + info.member;
+ }
+ line = line + " UUID=" + info.md_uuid;
+ return line;
+}
+
+//2 cases: remove volume or container
+//No check if container is used by other Volume.
+bool EtcRaidtab::removeEntry(const mdconf_info& info)
+{
+ map::iterator i;
+ if( info.md_uuid.empty() )
+ {
+ if( info.container_present == false)
+ {
+ return false;
+ }
+ if( info.container_info.md_uuid.empty() )
+ {
+ return false;
+ }
+ i = uuidtab.find( info.container_info.md_uuid );
+ }
+ else
+ {
+ i = uuidtab.find( info.md_uuid );
+ }
+ if( i != uuidtab.end() )
+ {
+ mdadm->remove( i->second.first, i->second.last-i->second.first+1 );
+ updateMdadmFile();
+ }
+ return true;
+}
+
void
EtcRaidtab::removeEntry( unsigned num )
{
@@ -92,9 +237,11 @@
EtcRaidtab::updateMdadmFile()
{
mtab.clear();
+ uuidtab.clear();
mdadm->updateFile();
mdadm->loadFile( mdadmname );
buildMdadmMap();
+ buildMdadmMap2();
}
void
@@ -126,3 +273,150 @@
lineno++;
}
}
+
+void
+EtcRaidtab::buildMdadmMap2()
+{
+ unsigned lineno = 0;
+ entry e;
+ for(lineno=0; lineno<mdadm->numLines(); lineno++ )
+ {
+ if( getLineType((*mdadm)[lineno]) == EtcRaidtab::ARRAY )
+ {
+ unsigned endl = lineno;
+ string uuid;
+ if( getArrayLine(endl,uuid) )
+ {
+ if(uuid.empty() )
+ {
+ // no UUID
+ continue;
+ }
+ e.first = lineno;
+ e.last = endl-1;
+ uuidtab[uuid] = e;
+ lineno = endl-1;
+ }
+ else
+ {
+ //
+ }
+ }
+ else
+ {
+ //
+ }
+ }
+}
+
+string
+EtcRaidtab::getUUID(const string& line)
+{
+ if( line.empty() )
+ {
+ return "";
+ }
+ string::size_type pos = line.find("UUID=");
+ if( pos != string::npos )
+ {
+ //switch 'uuid='
+ pos += 5;
+ // 128bit - represented as 32 hex digits + 3 x ':'.
+ return line.substr(pos,pos+35);
+ }
+ else
+ {
+ return "";
+ }
+}
+
+EtcRaidtab::lineType
+EtcRaidtab::getLineType(const string& line)
+{
+ if( line.empty() )
+ {
+ return EtcRaidtab::EMPTY;
+ }
+ string type = extractNthWord(0,line);
+ if( type == "DEVICE")
+ {
+ return EtcRaidtab::DEVICE;
+ }
+ if( type == "ARRAY")
+ {
+ return EtcRaidtab::ARRAY;
+ }
+ if( type == "MAILFROM")
+ {
+ return EtcRaidtab::MAILFROM;
+ }
+ if( type == "PROGRAM")
+ {
+ return EtcRaidtab::PROGRAM;
+ }
+ if( type == "CREATE")
+ {
+ return EtcRaidtab::CREATE;
+ }
+ if( type == "HOMEHOST")
+ {
+ return EtcRaidtab::HOMEHOST;
+ }
+ if( type == "AUTO")
+ {
+ return EtcRaidtab::AUTO;
+ }
+ if( type.find("#") == 0 )
+ {
+ return EtcRaidtab::COMMENT;
+ }
+ return EtcRaidtab::UNKNOWN;
+}
+
+bool EtcRaidtab::getArrayLine(unsigned& line, string& uuid)
+{
+ if( getLineType((*mdadm)[line]) != EtcRaidtab::ARRAY )
+ {
+ return false;
+ }
+ uuid = getUUID((*mdadm)[line]);
+ while( true )
+ {
+ line++;
+ if( line >= mdadm->numLines() )
+ {
+ if( uuid.empty() )
+ return false;
+ else
+ return true;
+ }
+ EtcRaidtab::lineType lt = getLineType((*mdadm)[line]);
+ if( lt == EtcRaidtab::ARRAY || lt == EtcRaidtab::DEVICE ||
+ lt == EtcRaidtab::AUTO || lt == EtcRaidtab::CREATE ||
+ lt == EtcRaidtab::HOMEHOST || lt == EtcRaidtab::MAILFROM ||
+ lt == EtcRaidtab::PROGRAM)
+ {
+ return true;
+ }
+ if( lt == EtcRaidtab::COMMENT ||
+ lt == EtcRaidtab::EMPTY )
+ {
+ continue;
+ }
+ if( lt == EtcRaidtab::UNKNOWN )
+ {
+ // possibly following line. Check for x=y pair.
+ if( ((*mdadm)[line]).find("=") == string::npos )
+ {
+ //kind of error.
+ return false;
+ }
+ //Check for UUID
+ if( uuid.empty() )
+ {
+ uuid = getUUID((*mdadm)[line]);
+ }
+ continue;
+ }
+ }
+}
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.h?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.h (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcRaidtab.h Thu Nov 19 17:31:49 2009
@@ -30,6 +30,8 @@
{
class AsciiFile;
+class Md;
+class MdPartCo;
class EtcRaidtab
{
@@ -39,6 +41,25 @@
void updateEntry( unsigned num, const std::list<string>& entries,
const string&, const std::list<string>& devs );
void removeEntry( unsigned num );
+
+ // From this structure line 'ARRAY' will be build in config file.
+ // Not all fields are mandatory
+ // If container is present then container line will be build
+ // before volume line.
+ struct mdconf_info
+ {
+ bool container_present; // container present
+ struct {
+ string metadata; // metadata
+ string md_uuid; // md uuid
+ } container_info;
+ string fs_name; // word after 'ARRAY'.
+ string md_uuid; // md uuid
+ string member; // member of container (if container is present)
+ };
+ bool updateEntry(const mdconf_info& info);
+ bool removeEntry(const mdconf_info& into);
+
protected:
struct entry
{
@@ -52,10 +73,38 @@
void updateMdadmFile();
void buildMdadmMap();
+ void buildMdadmMap2();
+
+ /* Extracts UUID=uuidNumber from line. */
+ string getUUID(const string& line);
+ enum lineType
+ {
+ DEVICE=0,
+ ARRAY,
+ MAILFROM,
+ PROGRAM,
+ CREATE,
+ HOMEHOST,
+ AUTO,
+ COMMENT,
+ EMPTY,
+ UNKNOWN
+ };
+ lineType getLineType(const string& line);
+
+ //Gets full array line, possibly consisted of several lines.
+ //line - will be updated and will point to first line that does not
+ // belong to initial array line.
+ //uuid - will be filled if found.
+ bool getArrayLine(unsigned& line, string& uuid);
+ string ContLine(const mdconf_info& info);
+ string ArrayLine(const mdconf_info& info);
+ bool updateContainer(const mdconf_info& info);
string mdadmname;
int mdadm_dev_line;
std::map mtab;
+ std::map uuidtab; // search by uuid, only for ARRAY lines.
AsciiFile* mdadm;
};
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.cc?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.cc Thu Nov 19 17:31:49 2009
@@ -34,7 +34,9 @@
#include "y2storage/SystemCmd.h"
#include "y2storage/Regex.h"
#include "y2storage/Container.h"
+#include "y2storage/EtcRaidtab.h"
#include "y2storage/StorageDefines.h"
+#include "y2storage/MdPartCo.h"
using namespace storage;
using namespace std;
@@ -75,9 +77,35 @@
md_uuid.erase( 0, pos+7 );
md_uuid = extractNthWord( 0, md_uuid );
}
- c.select( "Version : " );
- if( c.retcode()==0 && c.numLines(true)>0 )
- sb_ver = extractNthWord( 2, *c.getLine(0,true) );
+ // "Container" raid: IMSM, DDF
+ // "Version" with persistent block
+ has_container=false;
+ if( c.retcode()==0 )
+ {
+ if( c.select( "Version : " ) )
+ {
+ sb_ver = extractNthWord( 2, *c.getLine(0,true) );
+ }
+ else if ( c.select( "Container : " ) )
+ {
+ string tmpLine = *c.getLine(0,true);
+ string::size_type tmpPos;
+ // Line like: Container : /dev/md/imsm0, member 0
+ sb_ver = extractNthWord( 2, tmpLine );
+ //remove ',' after word.
+ tmpPos = sb_ver.find(",");
+ sb_ver.erase(tmpPos,tmpPos+1);
+ // get Member number
+ string member = extractNthWord( 4, tmpLine );
+ y2mil("Md " << nm << " has container. Member " << member);
+ member >> md_member;
+ has_container = true;
+ }
+ else
+ {
+ y2war("Did not found neither Version nor Container line!");
+ }
+ }
if (c.retcode()==0 && c.numLines(true)>0 )
{
y2mil( "line:\"" << *c.getLine(0,true) << "\"" );
@@ -178,6 +206,13 @@
break;
}
}
+ if( has_container )
+ {
+ getParent();
+ }
+ // Get md_name. It's important.
+ string tmpUuid;
+ MdPartCo::getUuidName(nm,tmpUuid,md_name);
}
Md::~Md()
@@ -700,6 +735,86 @@
*this = rhs;
}
+
+void Md::getParent()
+{
+ //in this case sb_ver will contain something like /dev/md/imsm0
+ string tmp;
+ string::size_type pos;
+ SystemCmd c(MDADMBIN " --detail " + quote(sb_ver) + " --export");
+ if( c.retcode() != 0 )
+ {
+ return;
+ }
+ parent_container = sb_ver;
+ if( c.select( "MD_METADATA" ) > 0 )
+ {
+ md_metadata = sb_ver;
+ tmp = *c.getLine(0,true);
+ pos = tmp.find("=");
+ tmp.erase(0,pos+1);
+ parent_metadata = sb_ver = tmp;
+ }
+ if(c.select( "MD_UUID" ) > 0)
+ {
+ tmp = *c.getLine(0,true);
+ pos = tmp.find("=");
+ tmp.erase(0,pos+1);
+ parent_uuid = tmp;
+ }
+ if( c.select( "MD_DEVNAME" ) > 0)
+ {
+ tmp = *c.getLine(0,true);
+ pos = tmp.find("=");
+ tmp.erase(0,pos+1);
+ parent_md_name = tmp;
+ }
+ y2mil("parent_container="<updateEntry( info ) )
+ {
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+
+
string Md::md_names[] = { "unknown", "raid0", "raid1", "raid5", "raid6",
"raid10", "multipath" };
string Md::par_names[] = { "none", "left-asymmetric", "left-symmetric",
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.h?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.h (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Md.h Thu Nov 19 17:31:49 2009
@@ -28,7 +28,7 @@
namespace storage
{
-
+class EtcRaidtab;
class MdCo;
class Md : public Volume
@@ -78,6 +78,8 @@
void logDifference( const Md& d ) const;
void getState(MdStateInfo& info) const;
+ int updateEntry(EtcRaidtab* tab);
+
protected:
void init();
void computeSize();
@@ -87,6 +89,9 @@
static storage::MdType toMdType( const string& val );
static storage::MdParity toMdParity( const string& val );
+ void getParent();
+ void setMetadata();
+
storage::MdType md_type;
storage::MdParity md_parity;
unsigned long chunk;
@@ -95,6 +100,16 @@
bool destrSb;
std::list<string> devs;
std::list<string> spare;
+ string md_name; // line in /dev/md/*
+
+ //in case of IMSM and DDF raids there is 'container'.
+ bool has_container;
+ string md_metadata;
+ string parent_container;
+ string parent_uuid;
+ string parent_md_name;
+ string parent_metadata;
+ int md_member;
static string md_names[storage::MULTIPATH+1];
static string par_names[storage::RIGHT_SYMMETRIC+1];
static unsigned md_major;
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdCo.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdCo.cc?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdCo.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdCo.cc Thu Nov 19 17:31:49 2009
@@ -72,7 +72,8 @@
MdPair p=mdPair(Md::notDeleted);
for( MdIter i=p.begin(); i!=p.end(); ++i )
{
- updateEntry( &(*i) );
+ //updateEntry( &(*i) );
+ i->updateEntry(getStorage()->getRaidtab());
}
}
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc Thu Nov 19 17:31:49 2009
@@ -495,10 +495,11 @@
return( ret );
}
-int MdPartCo::nr()
+int MdPartCo::nr(const string& name)
{
+ string tmp = name;
int n;
- nm.erase(0,2) >> n;
+ tmp.erase(0,2) >> n;
return n;
}
@@ -1150,6 +1151,12 @@
}
if( parent_container!=d.parent_container )
log += " ParentContainer:" + parent_container + "-->" + d.parent_container;
+ if( parent_md_name!=d.parent_md_name )
+ log += " ParentContMdName:" + parent_md_name + "-->" + d.parent_md_name;
+ if( parent_metadata!=d.parent_metadata )
+ log += " ParentContMetadata:" + parent_metadata + "-->" + d.parent_metadata;
+ if( parent_uuid!=d.parent_uuid )
+ log += " ParentContUUID:" + parent_uuid + "-->" + d.parent_uuid;
y2mil(log);
ConstMdPartPair pp=mdpartPair();
@@ -1191,6 +1198,10 @@
if( ret )
{
const MdPartCo* mdp = dynamic_cast(&rhs);
+ if( mdp == 0 )
+ {
+ return false;
+ }
ret = ret &&
active==mdp->active &&
del_ptable==mdp->del_ptable;
@@ -1208,9 +1219,13 @@
md_name == mdp->md_name);
if( ret )
{
- if( sb_ver == "imsm" || sb_ver == "ddf" )
+ if( has_container )
{
- ret = ret && (parent_container == mdp->parent_container);
+ ret = ret &&
+ (parent_container == mdp->parent_container &&
+ parent_md_name == mdp->parent_md_name &&
+ parent_metadata == mdp->parent_metadata &&
+ parent_uuid == mdp->parent_uuid);
}
}
if( ret )
@@ -1240,7 +1255,14 @@
md_type = rhs.md_type;
md_parity = rhs.md_parity;
md_state = rhs.md_state;
- parent_container = rhs.parent_container;
+ has_container = rhs.has_container;
+ if( has_container )
+ {
+ parent_container = rhs.parent_container;
+ parent_md_name = rhs.parent_md_name;
+ parent_metadata = rhs.parent_metadata;
+ parent_uuid = rhs.parent_uuid;
+ }
md_uuid = rhs.md_uuid;
sb_ver = rhs.sb_ver;
destrSb = rhs.destrSb;
@@ -1429,8 +1451,14 @@
setMdParity();
setMdDevs();
setSpares();
- readMdMap();
setMetaData();
+ MdPartCo::getUuidName(nm,md_uuid,md_name);
+ if( has_container )
+ {
+ MdPartCo::getUuidName(parent_container,parent_uuid,parent_md_name);
+ y2mil("md_name="< 0)
+ {
+ tmp = *c.getLine(0,true);
+ pos = tmp.find("=");
+ tmp.erase(0,pos+1);
+ uuid = tmp;
+ }
+ if( c.select( "MD_DEVNAME" ) > 0)
+ {
+ tmp = *c.getLine(0,true);
+ pos = tmp.find("=");
+ tmp.erase(0,pos+1);
+ mdName = tmp;
+ }
+ if( !mdName.empty() && !uuid.empty() )
+ {
+ return true;
+ }
+ }
+ return false;
}
@@ -1909,18 +1975,48 @@
updateEntry();
}
-
+int MdPartCo::getContMember()
+{
+ string::size_type pos = md_metadata.find_last_of("/");
+ if( pos != string::npos )
+ {
+ unsigned mem;
+ string tmp = md_metadata;
+ tmp.erase(0,pos+1);
+ tmp >> mem;
+ return mem;
+ }
+ return -1;
+}
void MdPartCo::updateEntry()
{
EtcRaidtab* tab = getStorage()->getRaidtab();
if( tab )
+ {
+ EtcRaidtab::mdconf_info info;
+ if( !md_name.empty() )
+ {
+ //Raid name is preferred.
+ info.fs_name = "/dev/md/" + md_name;
+ }
+ else
+ {
+ info.fs_name = dev;
+ }
+ info.md_uuid = md_uuid;
+ if( has_container )
{
- list<string> lines;
- list<string> devices;
- raidtabLines(lines);
- getDevs( devices );
- tab->updateEntry( nr(), lines, mdadmLine(), devices );
+ info.container_present = true;
+ info.container_info.md_uuid = parent_uuid;
+ info.container_info.metadata = parent_metadata;
+ info.member = getContMember();
}
+ else
+ {
+ info.container_present = false;
+ }
+ tab->updateEntry( info );
+ }
}
string MdPartCo::mdadmLine() const
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h?rev=59639&r1=59638&r2=59639&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h Thu Nov 19 17:31:49 2009
@@ -131,7 +131,7 @@
void syncRaidtab();
- int nr();
+ int nr(const string& name);
/* RAID Related functionality */
unsigned long chunkSize() const { return chunk_size; }
@@ -189,6 +189,9 @@
ProcPart& ppart,
bool isInst);
+ /* Returns uuid and possibly mdName for given MD Device.
+ * Input parameter: dev name - like md1 */
+ static bool getUuidName(const string dev,string& uuid, string& mdName);
protected:
// iterators over partitions
@@ -317,10 +320,11 @@
/* fields in 'map' file */
enum mdMap { MAP_DEV=0, MAP_META, MAP_UUID, MAP_NAME, };
- bool findMdMap(std::ifstream& file);
- bool readMdMap();
+ static bool findMdMap(std::ifstream& file);
+ int getContMember();
+
//Input: 'mdXXX' device.
static storage::CType envSelection(const string& name);
static bool havePartsInProc(const string& name, ProcPart& ppart);
@@ -338,7 +342,11 @@
storage::MdArrayState md_state;
/* Md Container - */
+ bool has_container;
string parent_container;
+ string parent_uuid;
+ string parent_metadata;
+ string parent_md_name;
string md_metadata;
string md_uuid;
string sb_ver;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org