00001
00002
00003 #ifndef _MdAccess_h
00004 #define _MdAccess_h
00005
00006 #include <string>
00007 #include <list>
00008
00009 using std::list;
00010
00011 struct MdInfo
00012 {
00013 string Name_C;
00014 unsigned long Blocks_l;
00015 unsigned long ChunkSize_l;
00016 unsigned Nr_i;
00017 unsigned UsedDisks_i;
00018 unsigned ValDisks_i;
00019 bool PersistentSuper_b;
00020 bool Spare_b;
00021 string RaidType_C;
00022 string ParityAlg_C;
00023 list<string> DevList_C;
00024 };
00025
00026 class MdAccess
00027 {
00028 public:
00029 MdAccess();
00030 virtual ~MdAccess();
00031 unsigned Cnt();
00032 MdInfo GetMd( int Idx_ii );
00033 bool GetMd( const string& Device_Cv, MdInfo& Val_Cr );
00034 bool ActivateMDs( bool Activate_bv, const list<string>& Avoid_Cv );
00035
00036 protected:
00037 list<MdInfo>::iterator FindMd( const string& Device_Cv );
00038 list<MdInfo> List_C;
00039 void ReadMdData();
00040 };
00041
00042 #endif