yast2-storage
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends

storage::Md Class Reference

#include <Md.h>

Inheritance diagram for storage::Md:
storage::Volume storage::Device

List of all members.

Public Member Functions

 Md (const MdCo &c, const string &name, const string &device, MdType Type, const list< string > &devs, const list< string > &spares)
 Md (const MdCo &c, const string &name, const string &device, SystemInfo &systeminfo)
 Md (const MdCo &c, const Md &v)
virtual ~Md ()
storage::MdType personality () const
void setPersonality (storage::MdType val)
storage::MdParity parity () const
int setParity (storage::MdParity val)
unsigned long chunkSizeK () const
void setChunkSizeK (unsigned long val)
void setMdUuid (const string &val)
bool destroySb () const
void setDestroySb (bool val=true)
const string & getMdUuid () const
list< string > getDevs (bool all=true, bool spare=false) const
int checkDevices ()
int addDevice (const string &dev, bool spare=false)
int removeDevice (const string &dev)
string createCmd () const
void updateData (SystemInfo &systeminfo)
void setUdevData (SystemInfo &systeminfo)
virtual list< string > udevId () const
virtual string procName () const
virtual string sysfsPath () const
virtual void print (std::ostream &s) const
Text removeText (bool doing) const
Text createText (bool doing) const
Text formatText (bool doing) const
void changeDeviceName (const string &old, const string &nw)
void getInfo (storage::MdInfo &info) const
bool equalContent (const Md &rhs) const
void logDifference (std::ostream &log, const Md &rhs) const
int getState (MdStateInfo &info) const
bool updateEntry (EtcMdadm *mdadm) const
virtual list< string > getUsing () const

Static Public Member Functions

static bool matchRegex (const string &dev)
static unsigned mdMajor ()
static bool mdStringNum (const string &name, unsigned &num)
static string mdDevice (unsigned num)
static bool notDeleted (const Md &l)

Protected Member Functions

void computeSize ()

Protected Attributes

MdType md_type
MdParity md_parity
unsigned long chunk_k
string md_uuid
string md_name
string sb_ver
bool destrSb
list< string > devs
list< string > spare
list< string > udev_id
bool has_container
bool inactive
string parent_container
string parent_uuid
string parent_md_name
string parent_metadata
string parent_member
storage::MdInfo info

Static Protected Attributes

static unsigned md_major = 0

Private Member Functions

 Md (const Md &)
Mdoperator= (const Md &)

Friends

class MdPartCo
std::ostream & operator<< (std::ostream &s, const Md &m)

Constructor & Destructor Documentation

storage::Md::Md ( const MdCo c,
const string &  name,
const string &  device,
MdType  Type,
const list< string > &  devs,
const list< string > &  spares 
)
storage::Md::Md ( const MdCo c,
const string &  name,
const string &  device,
SystemInfo systeminfo 
)
storage::Md::Md ( const MdCo c,
const Md v 
)

References storage::Device::dev, and y2deb.

storage::Md::~Md ( ) [virtual]

References storage::Device::dev, and y2deb.

storage::Md::Md ( const Md ) [private]

Member Function Documentation

int storage::Md::addDevice ( const string &  dev,
bool  spare = false 
)
void storage::Md::changeDeviceName ( const string &  old,
const string &  nw 
)

References devs, and spare.

int storage::Md::checkDevices ( )
unsigned long storage::Md::chunkSizeK ( ) const [inline]

References chunk_k.

void storage::Md::computeSize ( ) [protected]
string storage::Md::createCmd ( ) const
Text storage::Md::createText ( bool  doing) const [virtual]
bool storage::Md::destroySb ( ) const [inline]

References destrSb.

bool storage::Md::equalContent ( const Md rhs) const
Text storage::Md::formatText ( bool  doing) const [virtual]
list< string > storage::Md::getDevs ( bool  all = true,
bool  spare = false 
) const

References devs, and spare.

void storage::Md::getInfo ( storage::MdInfo info) const
const string& storage::Md::getMdUuid ( ) const [inline]

References md_uuid.

int storage::Md::getState ( MdStateInfo info) const
list< string > storage::Md::getUsing ( ) const [virtual]

Reimplemented from storage::Device.

References devs, and spare.

void storage::Md::logDifference ( std::ostream &  log,
const Md rhs 
) const
bool storage::Md::matchRegex ( const string &  dev) [static]

References storage::Regex::match().

Referenced by mdStringNum().

string storage::Md::mdDevice ( unsigned  num) [static]
unsigned storage::Md::mdMajor ( ) [static]
bool storage::Md::mdStringNum ( const string &  name,
unsigned &  num 
) [static]
static bool storage::Md::notDeleted ( const Md l) [inline, static]
Md& storage::Md::operator= ( const Md ) [private]
storage::MdParity storage::Md::parity ( ) const [inline]

References md_parity.

storage::MdType storage::Md::personality ( ) const [inline]

References md_type.

virtual void storage::Md::print ( std::ostream &  s) const [inline, virtual]

Reimplemented from storage::Volume.

virtual string storage::Md::procName ( ) const [inline, virtual]

Reimplemented from storage::Device.

References storage::Device::nm.

Referenced by sysfsPath().

int storage::Md::removeDevice ( const string &  dev)
Text storage::Md::removeText ( bool  doing) const [virtual]
void storage::Md::setChunkSizeK ( unsigned long  val) [inline]

References chunk_k.

void storage::Md::setDestroySb ( bool  val = true) [inline]

References destrSb.

void storage::Md::setMdUuid ( const string &  val) [inline]

References md_uuid.

Referenced by updateData().

int storage::Md::setParity ( storage::MdParity  val)
void storage::Md::setPersonality ( storage::MdType  val)

References computeSize(), and md_type.

void storage::Md::setUdevData ( SystemInfo systeminfo)
string storage::Md::sysfsPath ( ) const [virtual]

Reimplemented from storage::Device.

References procName(), and SYSFSDIR.

Referenced by getState().

virtual list<string> storage::Md::udevId ( ) const [inline, virtual]

Reimplemented from storage::Device.

References udev_id.

void storage::Md::updateData ( SystemInfo systeminfo)
bool storage::Md::updateEntry ( EtcMdadm mdadm) const

Friends And Related Function Documentation

friend class MdPartCo [friend]
std::ostream& operator<< ( std::ostream &  s,
const Md m 
) [friend]

Member Data Documentation

unsigned long storage::Md::chunk_k [protected]
bool storage::Md::destrSb [protected]
list<string> storage::Md::devs [protected]
bool storage::Md::has_container [protected]

Referenced by updateEntry().

bool storage::Md::inactive [protected]
storage::MdInfo storage::Md::info [mutable, protected]

Reimplemented from storage::Volume.

Referenced by getInfo(), and updateEntry().

unsigned storage::Md::md_major = 0 [static, protected]

Referenced by mdMajor().

string storage::Md::md_name [protected]
string storage::Md::md_uuid [protected]
string storage::Md::parent_container [protected]

Referenced by logDifference().

string storage::Md::parent_md_name [protected]

Referenced by logDifference().

string storage::Md::parent_member [protected]

Referenced by updateEntry().

string storage::Md::parent_metadata [protected]

Referenced by logDifference(), and updateEntry().

string storage::Md::parent_uuid [protected]

Referenced by logDifference(), and updateEntry().

string storage::Md::sb_ver [protected]
list<string> storage::Md::spare [protected]
list<string> storage::Md::udev_id [protected]

Referenced by setUdevData(), and udevId().


The documentation for this class was generated from the following files: