Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

PreMountsMgr Class Reference
[File System Event Manager]

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

#include <ivd-fsevent.h>

List of all members.

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

Detailed Description

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

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


Constructor & Destructor Documentation

PreMountsMgr::PreMountsMgr (  ) 

Default constructor.

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

References m_listPreM.

                           {
    m_listPreM.clear();
}

PreMountsMgr::~PreMountsMgr (  ) 

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

References m_listPreM.

                            {
    m_listPreM.clear();
}

PreMountsMgr::PreMountsMgr (  ) 

Default constructor.

PreMountsMgr::~PreMountsMgr (  ) 

Member Function Documentation

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 335 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().

                                                          {
    log_FUNC_m(Add);

    reply_str_t *findReplStr = Find(a_fsUUID);

    if (findReplStr == NULL) {
        reply_str_t *replStr = new reply_str_t(a_fsUUID, a_hdr);
        m_listPreM.push_back(replStr);
    } else {
        /* Mount holds BKL, so this should never happen, however...*/
        log_ERR_m("PreMount for dev " << a_fsUUID << " exists");
        throw ivd_Error(ie_FSE_MOUNT_PENDING, a_fsUUID.c_str());
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

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 334 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.

                                                          {
    log_FUNC_m(Add);

    reply_str_t *findReplStr = Find(a_fsUUID);

    if (findReplStr == NULL) {
        reply_str_t *replStr = new reply_str_t(a_fsUUID, a_hdr);
        m_listPreM.push_back(replStr);
    } else {
        /* Mount holds BKL, so this should never happen, however...*/
        log_ERR_m("PreMount for dev " << a_fsUUID << " exists");
        throw ivd_Error(ie_FSE_MOUNT_PENDING, a_fsUUID.c_str());
    }
}

Here is the call graph for this function:

void PreMountsMgr::Del ( UInt32_t  a_reqid  ) 

Delete canceled mount request.

void PreMountsMgr::Del ( UInt32_t  a_reqid  ) 

Delete canceled mount request.

Definition at line 361 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.

                                       {
    log_FUNC_m(Del);
    for (mIter_t Iter = m_listPreM.begin(); Iter != m_listPreM.end(); ++Iter) {
        if ((*Iter)->m_hdr.reqid == a_reqid) {

            reply_str_t *replStr = *Iter;
            m_listPreM.erase(Iter);

            log_WriteEvent("Mount timeout: pending mount request deleted.", 
                           "", 0, replStr->m_fsUUID);
            delete replStr;

            return;
        }
    }
    log_DBG_m(dbg_LOW, "Request [" << a_reqid << "] not found");
}

Here is the call graph for this function:

void PreMountsMgr::Del ( string  a_fsUUID  ) 

Delete succesfull mounted FS.

void PreMountsMgr::Del ( string  a_fsUUID  ) 

Delete succesfull mounted FS.

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

References FindIter(), log_FUNC_m, and m_listPreM.

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

                                     {
    log_FUNC_m(Del);
    mIter_t Iter = FindIter(a_fsUUID);
    if (Iter != m_listPreM.end()) {

        reply_str_t *replStr = *Iter;
        m_listPreM.erase(Iter);
        delete replStr;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

reply_str_t * PreMountsMgr::Find ( string  a_fsUUID  ) 

Check if some FS UUID exist in a list.

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

References FindIter(), log_FUNC_m, and m_listPreM.

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

                                              {
    log_FUNC_m(Find);
    mIter_t Iter = FindIter(a_fsUUID);
    if (Iter != m_listPreM.end()) {
        return *Iter;
    }
    return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

reply_str_t* PreMountsMgr::Find ( string  a_fsUUID  ) 

Check if some FS UUID exist in a list.

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

Find FS UUID and return Iterator in a list.

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 314 of file hpux/ivd-fsevent.cpp.

References log_FUNC_m, and m_listPreM.

Referenced by Del(), and Find().

                                             {
    log_FUNC_m(FindIter);
    for (mIter_t Iter = m_listPreM.begin(); Iter != m_listPreM.end(); Iter++){
        if ((*Iter)->m_fsUUID == a_fsUUID) {
            return Iter;
        }
    }
    return m_listPreM.end();
}

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 68 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: