PreMountsMgr Class Reference
[File System Event Manager]

#include <ivd-fsevent.h>

List of all members.


Detailed Description

Class to manage Pre mount events: class has private member list of all pre-mounted file systems.

Definition at line 47 of file hpux/ivd-fsevent.h.


Public Member Functions

 PreMountsMgr ()
 Default constructor.
 ~PreMountsMgr ()
void Add (string a_fsUUID, hsm_req_hdr_t a_hdr)
 Add a new entry in a list of pre mount events.
void Del (string a_fsUUID)
 Delete succesfull mounted FS.
void Del (UInt32_t a_reqid)
 Delete canceled mount request.
reply_str_tFind (string a_fsUUID)
 Check if some FS UUID exist in a list.
 PreMountsMgr ()
 Default constructor.
 ~PreMountsMgr ()
void Add (string a_fsUUID, ivd_req_hdr_t a_hdr)
 Add a new entry in a list of pre mount events.
void Del (string a_fsUUID)
 Delete succesfull mounted FS.
void Del (UInt32_t a_reqid)
 Delete canceled mount request.
reply_str_tFind (string a_fsUUID)
 Check if some FS UUID exist in a list.

Public Attributes

 log_CLASSID_m

Private Member Functions

mIter_t FindIter (string a_fsUUID)
 Find FS UUID and return Iterator in a list.
mIter_t FindIter (string a_fsUUID)
 Find FS UUID and return Iterator in a list.

Private Attributes

list< reply_str_t * > m_listPreM

Constructor & Destructor Documentation

PreMountsMgr::PreMountsMgr (  ) 

Default constructor.

Definition at line 310 of file hpux/ivd-fsevent.cpp.

References m_listPreM.

00310                            {
00311     m_listPreM.clear();
00312 }

PreMountsMgr::~PreMountsMgr (  ) 

Definition at line 314 of file hpux/ivd-fsevent.cpp.

References m_listPreM.

00314                             {
00315     m_listPreM.clear();
00316 }

PreMountsMgr::PreMountsMgr (  ) 

Default constructor.

PreMountsMgr::~PreMountsMgr (  ) 


Member Function Documentation

mIter_t PreMountsMgr::FindIter ( string  a_fsUUID  )  [private]

Find FS UUID and return Iterator in a list.

methods for PreMount events manager

Definition at line 300 of file hpux/ivd-fsevent.cpp.

References log_FUNC_m, and m_listPreM.

Referenced by Del(), and Find().

00300                                              {
00301     log_FUNC_m(FindIter);
00302     for (mIter_t Iter = m_listPreM.begin(); Iter != m_listPreM.end(); Iter++){
00303         if ((*Iter)->m_fsUUID == a_fsUUID) {
00304             return Iter;
00305         }
00306     }
00307     return m_listPreM.end();
00308 }

Here is the caller graph for this function:

void PreMountsMgr::Add ( string  a_fsUUID,
hsm_req_hdr_t  a_hdr 
)

Add a new entry in a list of pre mount events.

Definition at line 321 of file hpux/ivd-fsevent.cpp.

References Find(), ie_FSE_MOUNT_PENDING, ivd_Error, log_ERR_m, log_FUNC_m, m_listPreM, and NULL.

Referenced by Add(), and FSEvMgrThrd::Run().

00321                                                           {
00322     log_FUNC_m(Add);
00323 
00324     reply_str_t *findReplStr = Find(a_fsUUID);
00325 
00326     if (findReplStr == NULL) {
00327         reply_str_t *replStr = new reply_str_t(a_fsUUID, a_hdr);
00328         m_listPreM.push_back(replStr);
00329     } else {
00330         /* Mount holds BKL, so this should never happen, however...*/
00331         log_ERR_m("PreMount for dev " << a_fsUUID << " exists");
00332         throw ivd_Error(ie_FSE_MOUNT_PENDING, a_fsUUID.c_str());
00333     }
00334 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PreMountsMgr::Del ( string  a_fsUUID  ) 

Delete succesfull mounted FS.

Definition at line 336 of file hpux/ivd-fsevent.cpp.

References FindIter(), log_FUNC_m, and m_listPreM.

Referenced by Del(), FSEvMgrThrd::Run(), and i_FsEvMgr_i::SendReply().

00336                                      {
00337     log_FUNC_m(Del);
00338     mIter_t Iter = FindIter(a_fsUUID);
00339     if (Iter != m_listPreM.end()) {
00340 
00341         reply_str_t *replStr = *Iter;
00342         m_listPreM.erase(Iter);
00343         delete replStr;
00344     }
00345 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PreMountsMgr::Del ( UInt32_t  a_reqid  ) 

Delete canceled mount request.

Definition at line 347 of file hpux/ivd-fsevent.cpp.

References dbg_LOW, Del(), log_DBG_m, log_FUNC_m, log_WriteEvent(), reply_str_t::m_fsUUID, and m_listPreM.

00347                                        {
00348     log_FUNC_m(Del);
00349     for (mIter_t Iter = m_listPreM.begin(); Iter != m_listPreM.end(); ++Iter) {
00350         if ((*Iter)->m_hdr.reqid == a_reqid) {
00351 
00352             reply_str_t *replStr = *Iter;
00353             m_listPreM.erase(Iter);
00354 
00355             log_WriteEvent("Mount timeout: pending mount request deleted.", 
00356                            "", 0, replStr->m_fsUUID);
00357             delete replStr;
00358 
00359             return;
00360         }
00361     }
00362     log_DBG_m(dbg_LOW, "Request [" << a_reqid << "] not found");
00363 }

Here is the call graph for this function:

reply_str_t * PreMountsMgr::Find ( string  a_fsUUID  ) 

Check if some FS UUID exist in a list.

Definition at line 365 of file hpux/ivd-fsevent.cpp.

References FindIter(), log_FUNC_m, m_listPreM, and NULL.

Referenced by Add(), and i_FsEvMgr_i::SendReply().

00365                                               {
00366     log_FUNC_m(Find);
00367     mIter_t Iter = FindIter(a_fsUUID);
00368     if (Iter != m_listPreM.end()) {
00369         return *Iter;
00370     }
00371     return NULL;
00372 }

Here is the call graph for this function:

Here is the caller graph for this function:

mIter_t PreMountsMgr::FindIter ( string  a_fsUUID  )  [private]

Find FS UUID and return Iterator in a list.

void PreMountsMgr::Add ( string  a_fsUUID,
ivd_req_hdr_t  a_hdr 
)

Add a new entry in a list of pre mount events.

Definition at line 320 of file linux/ivd-fsevent.cpp.

References Add(), Find(), ie_FSE_MOUNT_PENDING, ivd_Error, log_ERR_m, log_FUNC_m, m_listPreM, and NULL.

00320                                                           {
00321     log_FUNC_m(Add);
00322 
00323     reply_str_t *findReplStr = Find(a_fsUUID);
00324 
00325     if (findReplStr == NULL) {
00326         reply_str_t *replStr = new reply_str_t(a_fsUUID, a_hdr);
00327         m_listPreM.push_back(replStr);
00328     } else {
00329         /* Mount holds BKL, so this should never happen, however...*/
00330         log_ERR_m("PreMount for dev " << a_fsUUID << " exists");
00331         throw ivd_Error(ie_FSE_MOUNT_PENDING, a_fsUUID.c_str());
00332     }
00333 }

Here is the call graph for this function:

void PreMountsMgr::Del ( string  a_fsUUID  ) 

Delete succesfull mounted FS.

void PreMountsMgr::Del ( UInt32_t  a_reqid  ) 

Delete canceled mount request.

reply_str_t* PreMountsMgr::Find ( string  a_fsUUID  ) 

Check if some FS UUID exist in a list.


Member Data Documentation

Definition at line 50 of file hpux/ivd-fsevent.h.

Definition at line 54 of file hpux/ivd-fsevent.h.

Referenced by Add(), Del(), Find(), FindIter(), PreMountsMgr(), and ~PreMountsMgr().


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

Generated on Mon Feb 27 19:45:54 2012 for OPENARCHIVE by  doxygen 1.5.6