#include <i_fsevmgr_impl.h>


Definition at line 34 of file hpux/i_fsevmgr_impl.h.
Public Member Functions | |
| i_FsEvMgr_i () | |
| virtual | ~i_FsEvMgr_i () |
| void | StartDebug (CORBA::Char a_level, const char *a_output, const char *a_flags, CORBA::ULong a_ivdfsFlags) |
| void | StopDebug () |
| void | SendReply (i_Status_t a_status, const char *a_fileUUID, i_HSM_ptr a_ihsm) |
| void | SetFSList (const i_StringList_t &a_list) |
| void | Mount (const char *a_fileUUID, const char *a_mountPoint) |
| void | Umount (const char *a_fileUUID, const char *a_mountPoint) |
| void | LimitAccess (const char *a_fileUUID) |
| i_FSInfoList_t * | GetFSInfoList () |
| i_FsEvMgr_i () | |
| virtual | ~i_FsEvMgr_i () |
| void | StartDebug (CORBA::Char a_level, const char *a_output, const char *a_flags, CORBA::ULong a_ivdfsFlags) |
| void | StopDebug () |
| void | SendReply (i_Status_t a_status, const char *a_fileUUID, i_HSM_ptr a_ihsm) |
| void | SetFSList (const i_StringList_t &a_list) |
| void | Mount (const char *a_fileUUID, const char *a_mountPoint) |
| void | Umount (const char *a_fileUUID, const char *a_mountPoint) |
| void | LimitAccess (const char *a_fileUUID) |
| i_FSInfoList_t * | GetFSInfoList () |
Public Attributes | |
| log_CLASSID_m | |
| i_FsEvMgr_i::i_FsEvMgr_i | ( | ) |
| i_FsEvMgr_i::~i_FsEvMgr_i | ( | ) | [virtual] |
| i_FsEvMgr_i::i_FsEvMgr_i | ( | ) |
| virtual i_FsEvMgr_i::~i_FsEvMgr_i | ( | ) | [virtual] |
| void i_FsEvMgr_i::StartDebug | ( | CORBA::Char | a_level, | |
| const char * | a_output, | |||
| const char * | a_flags, | |||
| CORBA::ULong | a_ivdfsFlags | |||
| ) | [virtual] |
Reimplemented from i_Component_i.
Definition at line 47 of file hpux/i_fsevmgr_impl.cpp.
References dbg_LOW, errno, g_fd, HSM_IOC_SET_DEBUG, log_DBG_m, log_FUNC_m, and i_Component_i::StartDebug().
00051 { 00052 00053 log_FUNC_m(StartDebug); 00054 00055 // call i_Component StartDebug 00056 i_Component_i::StartDebug(a_level, a_output, a_flags, a_ivdfsFlags); 00057 00058 // set debug in IVDFS 00059 log_DBG_m(dbg_LOW, "Set debug in HSMFS to 0x" << hex << a_ivdfsFlags); 00060 if (ioctl(g_fd, HSM_IOC_SET_DEBUG, &a_ivdfsFlags) < 0) { 00061 log_DBG_m(dbg_LOW, "ioctl(HSM_IOC_SET_DEBUG) failed: " << errno); 00062 } 00063 }

| void i_FsEvMgr_i::StopDebug | ( | ) | [virtual] |
Reimplemented from i_Component_i.
Definition at line 65 of file hpux/i_fsevmgr_impl.cpp.
References dbg_LOW, errno, g_fd, HSM_IOC_SET_DEBUG, log_DBG_m, log_FUNC_m, i_Component_i::StopDebug(), and zero.
00065 { 00066 log_FUNC_m(StopDebug); 00067 00068 UInt32_t zero = 0; 00069 00070 // set debug in IVDFS 00071 log_DBG_m(dbg_LOW, "Set debug in HSMFS to 0 (disable)"); 00072 if (ioctl(g_fd, HSM_IOC_SET_DEBUG, &zero) < 0) { 00073 log_DBG_m(dbg_LOW, "ioctl(HSM_IOC_SET_DEBUG) failed: " << errno); 00074 } 00075 00076 // call i_Component StopDebug 00077 i_Component_i::StopDebug(); 00078 }

| void i_FsEvMgr_i::SendReply | ( | i_Status_t | a_status, | |
| const char * | a_fileUUID, | |||
| i_HSM_ptr | a_ihsm | |||
| ) |
Definition at line 81 of file hpux/i_fsevmgr_impl.cpp.
References dbg_LOW, PreMountsMgr::Del(), errno, evt_ERROR, PreMountsMgr::Find(), g_fd, hsm_req_t::hdr, ie_ERRORWRITE, ie_FSE_NO_PREMOUNT, ipc_CATCH_IVD_THROW_CORBA_m, ivd_Error, log_DBG_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), reply_str_t::m_hdr, NULL, size, and hsm_req_hdr_t::status.
00082 { 00083 log_FUNC_m(SendReply); 00084 00085 string fileUUID(a_fileUUID); 00086 hsm_req_t req; 00087 int size = sizeof(hsm_req_hdr_t); 00088 00089 try { 00090 reply_str_t *replStr = g_premountMgr.Find(fileUUID); 00091 if (replStr == NULL) { 00092 log_ERR_m("No premount waiting for " << fileUUID 00093 << ". Probably timed-out."); 00094 log_WriteEvent(evt_ERROR, "Mount FAILED (request timeout).", 00095 "", 0, fileUUID); 00096 throw ivd_Error(ie_FSE_NO_PREMOUNT, ""); 00097 } 00098 00099 req.hdr = replStr->m_hdr; 00100 req.hdr.status = a_status; 00101 00102 int ret = write(g_fd, &req, size); 00103 if (ret < 0 || ret < size) { 00104 ostringstream sstr; 00105 sstr << "Mount reply FAILED (" << a_status << ")."; 00106 log_WriteEvent(evt_ERROR, sstr.str(), "", 0, fileUUID); 00107 log_ERR_m("Sending Reply failed for " << fileUUID 00108 << " errno: " << errno); 00109 throw ivd_Error(ie_ERRORWRITE, strerror(errno)); 00110 } 00111 if (a_status != 0) { 00112 log_DBG_m(dbg_LOW, "HSM FS can't be mounted: " << fileUUID << 00113 " Status : " << a_status); 00114 00115 ostringstream sstr; 00116 sstr << "Mount FAILED (" << a_status << ")."; 00117 log_WriteEvent(evt_ERROR, sstr.str(), "", 0, fileUUID); 00118 } 00119 00120 g_premountMgr.Del(fileUUID); 00121 } 00122 ipc_CATCH_IVD_THROW_CORBA_m; 00123 }

| void i_FsEvMgr_i::SetFSList | ( | const i_StringList_t & | a_list | ) |
Definition at line 125 of file hpux/i_fsevmgr_impl.cpp.
References dbg_NORM, log_DBG_m, and log_FUNC_m.
00125 { 00126 log_FUNC_m(SetFSList); 00127 00128 // just log it to debugs 00129 for (UInt32_t i=0; i < a_list.length(); ++i) { 00130 log_DBG_m(dbg_NORM, "HSM FileSystem ID[" << i << "]=" << a_list[i]); 00131 } 00132 00133 // NOP on linux. 00134 }
| void i_FsEvMgr_i::Mount | ( | const char * | a_fileUUID, | |
| const char * | a_mountPoint | |||
| ) |
Definition at line 137 of file hpux/i_fsevmgr_impl.cpp.
References log_FUNC_m.
00137 { 00138 log_FUNC_m(Mount); 00139 }
| void i_FsEvMgr_i::Umount | ( | const char * | a_fileUUID, | |
| const char * | a_mountPoint | |||
| ) |
Definition at line 143 of file hpux/i_fsevmgr_impl.cpp.
References log_FUNC_m.
00143 { 00144 log_FUNC_m(Umount); 00145 }
| void i_FsEvMgr_i::LimitAccess | ( | const char * | a_fileUUID | ) |
Definition at line 149 of file hpux/i_fsevmgr_impl.cpp.
References log_FUNC_m.
00149 { 00150 log_FUNC_m(LimitAccess); 00151 }
| i_FSInfoList_t * i_FsEvMgr_i::GetFSInfoList | ( | ) |
Definition at line 155 of file hpux/i_fsevmgr_impl.cpp.
References log_FUNC_m.
00155 { 00156 log_FUNC_m(GetFSInfoList); 00157 00158 i_FSInfoList_t_var fsInfoList = new i_FSInfoList_t(); 00159 00160 fsInfoList->length(0); 00161 00162 return fsInfoList._retn(); 00163 }
| void i_FsEvMgr_i::StartDebug | ( | CORBA::Char | a_level, | |
| const char * | a_output, | |||
| const char * | a_flags, | |||
| CORBA::ULong | a_ivdfsFlags | |||
| ) | [virtual] |
Reimplemented from i_Component_i.
| void i_FsEvMgr_i::StopDebug | ( | ) | [virtual] |
Reimplemented from i_Component_i.
| void i_FsEvMgr_i::SendReply | ( | i_Status_t | a_status, | |
| const char * | a_fileUUID, | |||
| i_HSM_ptr | a_ihsm | |||
| ) |
| void i_FsEvMgr_i::SetFSList | ( | const i_StringList_t & | a_list | ) |
| void i_FsEvMgr_i::Mount | ( | const char * | a_fileUUID, | |
| const char * | a_mountPoint | |||
| ) |
| void i_FsEvMgr_i::Umount | ( | const char * | a_fileUUID, | |
| const char * | a_mountPoint | |||
| ) |
| void i_FsEvMgr_i::LimitAccess | ( | const char * | a_fileUUID | ) |
| i_FSInfoList_t* i_FsEvMgr_i::GetFSInfoList | ( | ) |
1.5.6