Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Attributes

i_BackEndAgent_i Class Reference
[IVD Back-End Agent]

#include <i_bea_impl.h>

Inheritance diagram for i_BackEndAgent_i:
Inheritance graph
[legend]
Collaboration diagram for i_BackEndAgent_i:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 i_BackEndAgent_i (const char *a_jobIOR, UInt32_t a_beaNum)
i_VolSize_t GetMediumSize ()
i_VolSizes_tGetVolumeSizes ()
i_VolInfo_tGetVolInfo (i_Index_t a_volNum)
void Format (const i_VolSizes_t &a_volSizes, bool a_duplAITMode)
void Init (const i_VolInfo_t &a_volNum)
void UseResources (const i_Resource_t &a_res)
void Migrate ()
void Recall ()
void CloseMediumVolume (i_Index_t a_volNum)
void ReadFastRecoveryInfo (const i_VolInfoList_t &a_volumes, i_Index_t a_sysVolNum)
void RecreateFastRecoveryInfo (const i_VolInfoList_t &a_volumes, CORBA::Boolean a_recovery, const i_BoolList_t &a_openVolList, i_SysVolAction_e a_svAction, CORBA::Boolean a_into, const char *a_intoPath)
void VolDupRead ()
void VolDupWrite (i_VolSize_t a_volSize, CORBA::Boolean a_appendVolume, CORBA::Boolean a_srcMediumFull)
void RecreateMIC (const i_VolInfo_t &a_volume)
void Remove ()
i_Job_ptr GetJob () const
i_ResourceManager_ptr GetRM ()
bool IsAborted () const
UInt32_t GetBEANumber () const
UInt64_t GetJobID () const
ivd_JobType_e GetJobType () const
UInt64_t GetMigrationID () const
const UInt64_tGetBufferID () const
string GetDiskBufferFS () const
UInt32_t GetMediumKey () const
UInt32_t GetMedVolNumber () const
string GetMedVolID () const
string GetPoolID () const
const cmn_UUID_tGetPartitionID () const
string GetBarcode () const
UInt32_t GetMedVolType () const
UInt32_t GetMedVolBlockSize () const
UInt32_t GetMedVolPosition () const
UInt32_t GetRecallFileID () const
bool MustReadPosition (const bea_Medium *const a_med_p) const
bool MustVerifyHeader () const
UInt64_t GetSeekThreshold (const string &a_vendor, const string &a_product, ivd_MediaType_e a_type) const
void SysVolErased ()
bool WasSysVolErased () const
void ReleaseResources ()
void RequestNewResources ()
void WaitForResources ()
void ReadIDs (UInt32_t a_medVolNum, bool a_readFromVolHeader)
void VerifyIDs (const string &a_barcode, UInt32_t a_medVolNum, UInt32_t a_blockSize, const cmn_UUID_t &a_volID, const cmn_UUID_t &a_poolID)
void LogStats (cmn_Time &a_timeNeeded, UInt64_t a_bytes, bea_OpType_t a_opType)
void UpdateVolumeUsed ()
i_CompletionStatus_e HandleError (const ivd_Error &a_ie, bea_OpType_t a_opType=bea_OPOTHER)
void UpdateMediumIDs ()
void UpdateDriveIDs ()
void UpdateDriveIDs (Int32_t a_driveKey)
bea_DriveGetDrive ()

Public Attributes

cmn_ThreadCounter m_threadCounter

Protected Member Functions

virtual ~i_BackEndAgent_i ()

Private Types

enum  bea_PositionCheck_e {
  DEFAULT, ALWAYS,
  NEVER
}

Private Attributes

 log_CLASSID_m
auto_ptr< bea_Drivem_drive_ap
bool m_resourcesValid
i_Resource_t m_resources
cfg_DriveSettings m_driveSettings
cmn_UUID_t m_partID
i_Job_var m_job
i_ResourceManager_var m_rm
UInt32_t m_beaNumber
UInt64_t m_jobID
UInt64_t m_migrationID
ivd_JobType_e m_jobType
UInt64_t m_bufferID
string m_diskBufferFS
bool m_aborted
bea_PositionCheck_e m_verifyPosition
bool m_verifyHeader
bool m_sysVolErased
cmn_Mutex m_res_x
cmn_Condition m_res_c
bool m_firstCall

Detailed Description

Definition at line 52 of file i_bea_impl.h.


Member Enumeration Documentation

Enumerator:
DEFAULT 
ALWAYS 
NEVER 

Definition at line 156 of file i_bea_impl.h.

{DEFAULT, ALWAYS, NEVER} bea_PositionCheck_e;


Constructor & Destructor Documentation

i_BackEndAgent_i::i_BackEndAgent_i ( const char *  a_jobIOR,
UInt32_t  a_beaNum 
)

Definition at line 64 of file i_bea_impl.cpp.

References bea_verifyPos_c(), cmn_GetEnvVariable(), cmn_StrUpperCase(), dbg_LOW, cmn_Global::dirs, ivd_Directories::etc, g_cmn, ivd_BaseException::GetFriendly(), ie_INVALID_ARG, ipc_EXEC_m, ivd_Error, log_DBG_m, log_ERR_m, log_FUNC_m, m_beaNumber, m_bufferID, m_diskBufferFS, m_driveSettings, m_job, m_jobID, m_jobType, m_migrationID, m_partID, m_verifyPosition, pf_File::Parse(), cfg_DriveSettings::Refresh(), ipc_Corba::RegisterMajorServant(), and ipc_Corba::Singleton().

  : m_resourcesValid(false),
    m_beaNumber(a_beaNum),
    m_jobID(0),
    m_migrationID(0),
    m_jobType(jt_UNKNOWN),
    m_aborted(false),
    m_verifyPosition(DEFAULT),
    m_verifyHeader(true),
    m_sysVolErased(false),
    m_res_c(&m_res_x),
    m_firstCall(true){

    log_FUNC_m(i_BackEndAgent_i);

    ipc_EXEC_m(
        CORBA::Object_var obj = ipc_Corba::Singleton().m_orb->string_to_object(a_jobIOR);
        m_job = i_Job::_narrow(obj);
        if( CORBA::is_nil(m_job) ) {
            log_ERR_m("Can't narrow passed IOR to i_Job (wrong IOR or nil)");
            throw ivd_Error(ie_INVALID_ARG, "Invalid i_Job reference.");
        };
        i_JobParams_var jobParams  = m_job->GetJobParams();
        m_jobID = jobParams->jobID;
        m_migrationID = jobParams->migID;
        m_partID = string(jobParams->partUUID);
        m_jobType = static_cast<ivd_JobType_e>(jobParams->jobType);
        m_bufferID = jobParams->bufId;
        m_diskBufferFS = jobParams->diskBufferFS;

        log_DBG_m(dbg_LOW,
            endl <<
            "** Job ID : " << m_jobID << endl <<
            "** Mig ID : " << m_migrationID << endl <<
            "** Part ID: " << m_partID << endl);
    );

    string verifyPos = cmn_GetEnvVariable(bea_verifyPos_c);
    if (verifyPos.length() > 0) {
        log_DBG_m(dbg_LOW, bea_verifyPos_c << " = " << verifyPos << ".");
        cmn_StrUpperCase(verifyPos);

        if (verifyPos.compare("NEVER") == 0) {
            m_verifyPosition = NEVER;
        }
        else if (verifyPos.compare("ALWAYS") == 0) {
            m_verifyPosition = ALWAYS;
        }
        else {
            log_DBG_m(dbg_LOW,
                bea_verifyPos_c << " defined but contains unexpected contents.");
        }
    }

    // Parse drive configuration file
    try {
        pf_File driveCfg;
        driveCfg.Parse(g_cmn.dirs.etc + "drive.cfg");
        m_driveSettings.Refresh(driveCfg);
    }
    catch (const ivd_Exception& ie) {
        log_DBG_m(dbg_LOW,
            "Drive configuration file can't be parsed. Using defaults."
            << ie.GetFriendly() );
    }

    ipc_Corba::RegisterMajorServant(this);

    ipc_EXEC_m(
        m_job->RegisterBEA(this->_this(), m_beaNumber);
    );
}

Here is the call graph for this function:

i_BackEndAgent_i::~i_BackEndAgent_i (  )  [protected, virtual]

Definition at line 139 of file i_bea_impl.cpp.

References dbg_LOW, dbg_NORM, log_DBG_m, log_FUNC_m, m_drive_ap, m_threadCounter, ipc_Corba::Shutdown(), and cmn_ThreadCounter::WaitAllEnd().

                                   {
    log_FUNC_m(~i_BackEndAgent_i);

    try {
        log_DBG_m(dbg_NORM, "Waiting for all threads to complete...");
        m_threadCounter.WaitAllEnd();

        log_DBG_m(dbg_NORM, "All threads finished.");

        m_drive_ap->Close();
        ipc_Corba::Shutdown();
    }
    catch(...) {
        log_DBG_m(dbg_LOW, "Ignored exception in dtor.");
    };
}

Here is the call graph for this function:


Member Function Documentation

void i_BackEndAgent_i::CloseMediumVolume ( i_Index_t  a_volNum  ) 

Definition at line 820 of file i_bea_impl.cpp.

References cmn_Global::dirs, ivd_Directories::fri, g_cmn, bea_Medium::GetVolume(), ie_BEA_FRI, ivd_Error, log_FUNC_A_m, m_drive_ap, m_resourcesValid, and ReadIDs().

                                                           {
    log_FUNC_A_m(CloseMediumVolume, "volNum: " << a_volNum);

    try {
        // TODO: Shall IDs be always read from the volume header in this case?
        ReadIDs(a_volNum, false);

        bea_Medium* med_p = m_drive_ap->GetMedium();
        bea_FRI fri(*this, med_p->GetVolume(a_volNum), g_cmn.dirs.fri);

        try {
            // Check if there's a FRI on the volume already?
            if (fri.PositionToStartOfFRI() == true) {
                // Job might call UseResources() again. Current resources must
                // be invalidated.
                m_drive_ap->Close();
                m_resourcesValid = false;

                // TODO: Shall existing FRI be overwritten instead?

                // FRI already on the medium: Volume can't be closed.
                throw ivd_Error(ie_BEA_FRI, "FRI already exists on the medium volume.");
            }
            // Positioned to end of volume

            fri.CloseVolume();
        }
        catch (const ivd_Exception) {
            // Job might call UseResources() again. Current resources must
            // be invalidated.
            m_drive_ap->Close();
            m_resourcesValid = false;
            throw;
        }

        // Job might call UseResources() again. Current resources must
        // be invalidated.
        m_drive_ap->Close();
        m_resourcesValid = false;

    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_BackEndAgent_i::Format ( const i_VolSizes_t a_volSizes,
bool  a_duplAITMode 
)

Definition at line 542 of file i_bea_impl.cpp.

References bea_OPWRITE, dbg_LOW, evt_ERROR, ivd_BaseException::GetFriendly(), HandleError(), ie_FATAL_ERROR, ivd_Error, log_DBG_m, log_FUNC_m, log_WriteEvent(), m_drive_ap, m_jobID, NULL, and WaitForResources().

                                                                               {
    log_FUNC_m(Format);

    ostringstream partInfo;
    partInfo << "Format: ";

    if (a_volSizes.length() < 16) {
        for (UInt32_t i = 0; i < a_volSizes.length(); i++) {
            partInfo << a_volSizes[i] << ", ";
        }
    }
    else {
        partInfo << a_volSizes.length() << " volumes.";
    }

    WaitForResources();

    log_DBG_m(dbg_LOW, partInfo.str());
    try {
        try {
            vector<UInt32_t> volSizes;
            volSizes.resize(a_volSizes.length());

            for (vector<UInt32_t>::size_type i = 0; i < a_volSizes.length(); i++) {
                volSizes[i] = a_volSizes[i];
            };

            log_WriteEvent(
                partInfo.str(),
                "", m_jobID,
                m_drive_ap->GetMedium()->GetBarcode() );

            ivd_Time_t  fmtTime = time(NULL);
            m_drive_ap->GetMedium()->Format(volSizes, a_duplAITMode);
            fmtTime = time(NULL) - fmtTime;

            ostringstream sstr;
            sstr << "Medium formatted (format time: "
                 << ((fmtTime+30)/60) << " min)";

            log_WriteEvent(
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );
        }
        catch (ivd_Error& ie) {
            ostringstream sstr;
            sstr << "Medium format FAILED (" << ie.GetFriendly() << ").";
            log_WriteEvent(
                evt_ERROR,
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            (void)HandleError(ie, bea_OPWRITE);
            throw;
        }
        catch (ivd_Exception &ie) {
            ostringstream sstr;
            sstr << "Medium format FAILED (" << ie.GetFriendly() << ").";
            log_WriteEvent(
                evt_ERROR,
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            throw;
        }
        catch (...) {
            log_WriteEvent(
                evt_ERROR,
                "Medium format FAILED.",
                 "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            throw ivd_Error(ie_FATAL_ERROR, "Unknown exception when creating medium volumes.");
        }
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

string i_BackEndAgent_i::GetBarcode (  )  const [inline]
UInt32_t i_BackEndAgent_i::GetBEANumber (  )  const [inline]
const UInt64_t& i_BackEndAgent_i::GetBufferID (  )  const [inline]

Definition at line 103 of file i_bea_impl.h.

References m_bufferID.

Referenced by bea_MigrationThread::Migrate(), and bea_RecallThread::Recall().

{ return m_bufferID; };

Here is the caller graph for this function:

string i_BackEndAgent_i::GetDiskBufferFS (  )  const [inline]

Definition at line 104 of file i_bea_impl.h.

References m_diskBufferFS.

Referenced by bea_MigrationThread::Migrate(), bea_DupReadThread::ReadMedVolume(), bea_RecallThread::Recall(), and bea_DupWriteThread::WriteMedVolume().

{ return m_diskBufferFS; };

Here is the caller graph for this function:

bea_Drive* i_BackEndAgent_i::GetDrive (  )  [inline]

Definition at line 144 of file i_bea_impl.h.

References m_drive_ap.

Referenced by bea_MigrationThread::ExchangeResources(), and bea_RecallThread::Recall().

{ return m_drive_ap.get(); }

Here is the caller graph for this function:

i_Job_ptr i_BackEndAgent_i::GetJob (  )  const
UInt64_t i_BackEndAgent_i::GetJobID (  )  const [inline]
ivd_JobType_e i_BackEndAgent_i::GetJobType (  )  const [inline]

Definition at line 101 of file i_bea_impl.h.

References m_jobType.

Referenced by bea_MigrationThread::PrepareVolume().

{ return m_jobType; };

Here is the caller graph for this function:

UInt32_t i_BackEndAgent_i::GetMediumKey (  )  const [inline]

Definition at line 105 of file i_bea_impl.h.

References m_resources, and i_Resource_t::mediumKey.

Referenced by bea_MigrationThread::FRIVolumeStart().

{ return m_resources.mediumKey; };

Here is the caller graph for this function:

i_VolSize_t i_BackEndAgent_i::GetMediumSize (  ) 

Definition at line 423 of file i_bea_impl.cpp.

References HandleError(), log_FUNC_m, m_drive_ap, and size.

                                            {
    log_FUNC_m(GetMediumSize);

    UInt32_t size(0);
    try {
        try {
            bea_Medium* med(m_drive_ap->GetMedium());
            size = med->GetSize();
        }
        catch (ivd_Error& ie) {
            (void)HandleError(ie);
            throw;
        }
    }
    ipc_CATCH_IVD_THROW_CORBA_m;

    return size;

}

Here is the call graph for this function:

UInt32_t i_BackEndAgent_i::GetMedVolBlockSize (  )  const [inline]

Definition at line 112 of file i_bea_impl.h.

References i_Resource_t::blockSize, and m_resources.

Referenced by bea_MigrationThread::PrepareVolume(), bea_RecallThread::Recall(), bea_RecallThread::Run(), VolDupRead(), and bea_DupWriteThread::WriteMedVolume().

{ return m_resources.blockSize; };

Here is the caller graph for this function:

string i_BackEndAgent_i::GetMedVolID (  )  const [inline]

Definition at line 107 of file i_bea_impl.h.

References m_resources, and i_Resource_t::medVolId.

Referenced by bea_MigrationThread::PrepareVolume(), bea_RecallThread::Run(), and bea_DupWriteThread::WriteMedVolume().

{ return string(m_resources.medVolId); };

Here is the caller graph for this function:

UInt32_t i_BackEndAgent_i::GetMedVolNumber (  )  const [inline]
UInt32_t i_BackEndAgent_i::GetMedVolPosition (  )  const [inline]

Definition at line 113 of file i_bea_impl.h.

References i_Resource_t::blockOffset, and m_resources.

{ return m_resources.blockOffset; };

UInt32_t i_BackEndAgent_i::GetMedVolType (  )  const [inline]

Definition at line 111 of file i_bea_impl.h.

References m_resources, and i_Resource_t::medVolType.

Referenced by bea_DupWriteThread::AppendVolume(), and bea_DupWriteThread::WriteMedVolume().

{ return m_resources.medVolType; };

Here is the caller graph for this function:

UInt64_t i_BackEndAgent_i::GetMigrationID (  )  const [inline]

Definition at line 102 of file i_bea_impl.h.

References m_migrationID.

Referenced by bea_MigrationThread::FRIVolumeStart().

{ return m_migrationID; };

Here is the caller graph for this function:

const cmn_UUID_t& i_BackEndAgent_i::GetPartitionID (  )  const [inline]

Definition at line 109 of file i_bea_impl.h.

References m_partID.

Referenced by bea_MigrationThread::PrepareVolume().

{ return m_partID; };

Here is the caller graph for this function:

string i_BackEndAgent_i::GetPoolID (  )  const [inline]

Definition at line 108 of file i_bea_impl.h.

References m_resources, and i_Resource_t::poolUUID.

Referenced by bea_MigrationThread::PrepareVolume(), and bea_RecallThread::Run().

{ return string(m_resources.poolUUID); };

Here is the caller graph for this function:

UInt32_t i_BackEndAgent_i::GetRecallFileID (  )  const [inline]

Definition at line 114 of file i_bea_impl.h.

References i_Resource_t::fileId, and m_resources.

{ return m_resources.fileId; };

i_ResourceManager_ptr i_BackEndAgent_i::GetRM (  ) 

Definition at line 1210 of file i_bea_impl.cpp.

References ipc_EXEC_m, log_FUNC_m, m_rm, and ipc_Corba::ResolveRM().

Referenced by bea_DupWriteThread::AppendVolume(), bea_FRI::CloseVolumeInRMDB(), HandleError(), bea_FRIThread::IsClosed(), bea_MigrationThread::PrepareVolume(), UpdateDriveIDs(), UpdateMediumIDs(), UpdateVolumeUsed(), and UseResources().

                                              {
    log_FUNC_m(GetRM);
    ipc_EXEC_m(
        if (CORBA::is_nil(m_rm)) {
            CORBA::Object_var obj = ipc_Corba::ResolveRM();
            m_rm = i_ResourceManager::_narrow(obj);
        }
        return i_ResourceManager::_duplicate(m_rm);
    );
}

Here is the call graph for this function:

Here is the caller graph for this function:

UInt64_t i_BackEndAgent_i::GetSeekThreshold ( const string &  a_vendor,
const string &  a_product,
ivd_MediaType_e  a_type 
) const

Definition at line 1200 of file i_bea_impl.cpp.

References cfg_DriveSettings::FindThreshold(), and m_driveSettings.

Referenced by bea_RecallThread::Recall().

                                  {

    return m_driveSettings.FindThreshold(a_vendor, a_product, a_type);
}

Here is the call graph for this function:

Here is the caller graph for this function:

i_VolInfo_t * i_BackEndAgent_i::GetVolInfo ( i_Index_t  a_volNum  ) 

Definition at line 475 of file i_bea_impl.cpp.

References bea_VolInfo_t::accessNum, bea_VolInfo_t::accessTime, bea_VolInfo_t::appendNum, bea_VolInfo_t::appendTime, bea_VolInfo_t::blockSize, HandleError(), bea_VolInfo_t::implID, log_FUNC_A_m, m_drive_ap, bea_VolInfo_t::medVolID, bea_VolInfo_t::owriteNum, bea_VolInfo_t::owriteTime, bea_VolInfo_t::partID, bea_VolInfo_t::poolID, ReadIDs(), bea_VolInfo_t::size, bea_VolInfo_t::sysVolNum, cmn_UUID_t::ToString(), bea_VolInfo_t::type, VOL_BLANK, VOL_ECMA, VOL_IVD, VOL_IVD_NT, VOL_OTHER, VOL_TAR, and bea_VolInfo_t::volNum.

                                                            {
    log_FUNC_A_m(GetVolInfo, "a_volNum: " << a_volNum);

    i_VolInfo_t_var iInfo(new i_VolInfo_t);
    Int32_t         medType(0);

    try {
        bea_VolInfo_t info;
        try {
            // TODO: Shall IDs be always read from the volume header in this case?
            //       The function is called to detect volume types when doing
            //       the initialisation
            ReadIDs(a_volNum, false);

            bea_Medium* med(m_drive_ap->GetMedium());
            info = med->GetVolume(a_volNum)->GetVolumeInfo();
            medType = med->GetRMType();
        }
        catch (ivd_Error& ie) {
            (void)HandleError(ie);
            throw;
        }

        switch (info.type) {
            case VOL_BLANK:
                iInfo->type = i_VOL_BLANK;
                break;
            case VOL_IVD:
                iInfo->type = i_VOL_IVD;
                break;
            case VOL_ECMA:
                iInfo->type = i_VOL_ECMA;
                break;
            case VOL_TAR:
                iInfo->type = i_VOL_TAR;
                break;
            case VOL_IVD_NT:
                iInfo->type = i_VOL_IVD_NT;
                break;
            case VOL_OTHER:
            default:
                iInfo->type = i_VOL_OTHER;
                break;
        };
        iInfo->mediumType  = medType;
        iInfo->implID      = CORBA::string_dup(info.implID.c_str());
        iInfo->volNum      = info.volNum;
        iInfo->size        = info.size;
        iInfo->sysVolNum   = info.sysVolNum;
        iInfo->medVolID    = CORBA::string_dup(info.medVolID.ToString().c_str());
        iInfo->poolID      = CORBA::string_dup(info.poolID.ToString().c_str());
        iInfo->partID      = CORBA::string_dup(info.partID.ToString().c_str());
        iInfo->blockSize   = info.blockSize;
        iInfo->accessNum   = info.accessNum;
        iInfo->appendNum   = info.appendNum;
        iInfo->owriteNum   = info.owriteNum;
        iInfo->accessTime  = info.accessTime;
        iInfo->appendTime  = info.appendTime;
        iInfo->owriteTime  = info.owriteTime;

    } ipc_CATCH_IVD_THROW_CORBA_m;

    return iInfo._retn();
}

Here is the call graph for this function:

i_VolSizes_t * i_BackEndAgent_i::GetVolumeSizes (  ) 

Definition at line 445 of file i_bea_impl.cpp.

References dbg_DETAIL, dbg_NORM, HandleError(), log_DBG_m, log_FUNC_m, m_drive_ap, and size.

                                               {
    log_FUNC_m(GetVolumeSizes);

    i_VolSizes_t_var volSizes(new i_VolSizes_t);
    try {
        try {
            bea_Medium* med(m_drive_ap->GetMedium());
            volSizes->length(med->GetVolumeCount());

            log_DBG_m(dbg_NORM,
                "Number of volumes: " << med->GetVolumeCount());

            for (UInt32_t i = 0; i < volSizes->length(); i++) {
                UInt32_t size = med->GetVolume(i+1)->GetSize();
                volSizes[i] = size;
                log_DBG_m(dbg_DETAIL, (i+1) << ". " << size);
            }
        }
        catch (ivd_Error& ie) {
            (void)HandleError(ie);
            throw;
        }
    }
    ipc_CATCH_IVD_THROW_CORBA_m;

    return volSizes._retn();
}

Here is the call graph for this function:

i_CompletionStatus_e i_BackEndAgent_i::HandleError ( const ivd_Error a_ie,
bea_OpType_t  a_opType = bea_OPOTHER 
)

Definition at line 1351 of file i_bea_impl.cpp.

References i_Resource_t::barcode, bea_OPOTHER, bea_OPREAD, dbg_LOW, i_Resource_t::driveCtrlDevice, i_Resource_t::driveKey, evt_ERROR, ivd_BaseException::GetError(), ivd_BaseException::GetFriendly(), GetRM(), i_HW_ERROR, i_MEDIUM_ERROR, i_SUCCEDED, ie_BEA_INVDEVTYPE, ie_BEA_INVPOS, ie_BEA_INVVOLFMT, ie_BEA_INVVOLID, ie_MEDIUM_HWERR, ie_MEDIUM_MEDERR, ie_MEDIUM_PROTECTED, ie_SCSI_HOST, ipc_EXEC_m, log_DBG_m, log_FUNC_m, log_WriteEvent(), ipc_Log::LogStatus(), m_drive_ap, m_jobID, m_resources, i_Resource_t::mediumKey, i_Resource_t::poolType, and pt_WORM.

Referenced by bea_FRI::CloseVolume(), bea_FRI::CopyFromDiskToMedium(), bea_FRI::DeleteFRIOnVolume(), Format(), GetMediumSize(), GetVolInfo(), GetVolumeSizes(), Init(), bea_FRI::PositionToStartOfFRI(), bea_FRI::ReadFRI(), bea_FRI::ReadFRIStart(), ReadIDs(), bea_RecallThread::Run(), bea_MigrationThread::Run(), bea_DupWriteThread::Run(), bea_DupReadThread::Run(), bea_FRIThread::Run(), UseResources(), and bea_FRI::VerifyExistenceOfFileMark().

                              {

    log_FUNC_m(HandleError);

    i_CompletionStatus_e status = i_UNKNOWN;

    switch (a_ie.GetError()) {
        case ie_BEA_INVPOS:
        case ie_BEA_INVVOLFMT:
        case ie_BEA_INVVOLID:
        case ie_BEA_INVDEVTYPE:
            status = i_INV_MEDVOLID;
            break;
        case ie_MEDIUM_MEDERR:
        case ie_MEDIUM_PROTECTED:
            status = i_MEDIUM_ERROR;
            break;
        case ie_MEDIUM_HWERR:
        case ie_SCSI_HOST:
            status = i_HW_ERROR;
            break;
        default:
            if (status == i_SUCCEDED) {
                status = i_UNKNOWN;
            };
    };

    try {
        ipc_EXEC_m(
            i_ResourceManager_var rm = GetRM();
            switch (status) {
                case i_MEDIUM_ERROR:
                    {
                        string medError;

                        if (  a_opType == bea_OPREAD
                        || a_opType == bea_OPOTHER) {
                            log_WriteEvent(
                                evt_ERROR, "Medium is unusable.", "",
                                m_jobID, string(m_resources.barcode) );

                            rm->MediumUnusable(m_resources.mediumKey);

                            medError = "unusable";
                        }
                        else {
                            log_WriteEvent(
                                evt_ERROR, "Medium is unreliable.", "",
                                m_jobID, string(m_resources.barcode) );

                            rm->MediumUnreliable(m_resources.mediumKey);
                            medError = "unreliable";
                        }

                        if (m_resources.poolType == pt_WORM){

                            ostringstream sstr;

                            string prod("unknown");
                            string sn("unknown");

                            if (m_drive_ap.get() != NULL) {
                                prod = m_drive_ap->GetProductID();
                                sn = m_drive_ap->GetSerialNumber();
                            }

                            sstr
                                << "WORM medium is " << medError << ". Marking drive bad. ("
                                << prod << " sn:" << sn << ")";

                            log_WriteEvent(
                                evt_ERROR, sstr.str(), "", m_jobID,
                                string(m_resources.driveCtrlDevice) );

                            rm->DriveError(m_resources.driveKey);
                        }
                        break;
                    }

                case i_HW_ERROR:
                    {
                        string prod("unknown");
                        string sn("unknown");

                        if (m_drive_ap.get() != NULL) {
                            prod = m_drive_ap->GetProductID();
                            sn = m_drive_ap->GetSerialNumber();
                        }

                        ostringstream sstr;
                        if (a_ie.GetError() == ie_MEDIUM_HWERR) {
                            sstr
                                << "Drive has hardware errors. ("
                                << prod << " sn:" << sn << ")";
                        }
                        else {
                            sstr
                                << "SCSI host for drive has errors."
                                << "Marking drive bad. ("
                                << prod << " sn:" << sn << ")";
                        }

                        log_WriteEvent(
                            evt_ERROR, sstr.str(), "", m_jobID,
                            string(m_resources.driveCtrlDevice) );

                        log_WriteEvent(
                            evt_ERROR, "Marking medium unusable.", "",
                            m_jobID, string(m_resources.barcode) );

                        rm->DriveError(m_resources.driveKey);
                        rm->MediumUnusable(m_resources.mediumKey);

                    }
                    break;

                default:
                    // Log all other errors
                    {
                        ostringstream sstr;
                        sstr
                            << ipc_Log::LogStatus(status) << ": "
                            << a_ie.GetFriendly();

                        log_WriteEvent(
                            evt_ERROR, sstr.str(), "", m_jobID,
                            string(m_resources.barcode) );
                    }
            };
        );
    }
    catch(...) {
        log_DBG_m(dbg_LOW, "Caught exception when setting resource state.");
    }

    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::Init ( const i_VolInfo_t a_volNum  ) 

Definition at line 676 of file i_bea_impl.cpp.

References i_VolInfo_t::accessNum, bea_VolInfo_t::accessNum, i_VolInfo_t::accessTime, bea_VolInfo_t::accessTime, i_VolInfo_t::appendNum, bea_VolInfo_t::appendNum, i_VolInfo_t::appendTime, bea_VolInfo_t::appendTime, bea_OPWRITE, bea_VolInfo_t::blockSize, i_VolInfo_t::blockSize, dbg_NORM, evt_ERROR, ivd_BaseException::GetFriendly(), HandleError(), ie_FATAL_ERROR, ivd_Error, jt_ADMIN, log_DBG_m, log_FUNC_m, log_WriteEvent(), m_drive_ap, m_jobID, m_jobType, m_resources, m_resourcesValid, i_Resource_t::mediumFamily, bea_VolInfo_t::medVolID, i_VolInfo_t::medVolID, mf_DISK, i_VolInfo_t::owriteNum, bea_VolInfo_t::owriteNum, i_VolInfo_t::owriteTime, bea_VolInfo_t::owriteTime, bea_VolInfo_t::partID, i_VolInfo_t::partID, bea_VolInfo_t::poolID, i_VolInfo_t::poolID, bea_VolInfo_t::size, i_VolInfo_t::size, bea_VolInfo_t::sysVol, bea_VolInfo_t::sysVolNum, i_VolInfo_t::sysVolNum, bea_VolInfo_t::type, bea_VolInfo_t::volNum, and i_VolInfo_t::volNum.

                                                       {
    log_FUNC_m(Init);

    log_DBG_m(dbg_NORM,"Init invoked with" << endl <<
        "a_volume.volNum     " << a_volume.volNum     << endl <<
        "a_volume.size       " << a_volume.size       << endl <<
        "a_volume.sysVolNum  " << a_volume.sysVolNum  << endl <<
        "a_volume.medVolID   " << a_volume.medVolID   << endl <<
        "a_volume.poolID     " << a_volume.poolID     << endl <<
        "a_volume.partID     " << a_volume.partID     << endl <<
        "a_volume.blockSize  " << a_volume.blockSize  << endl );

    //
    // BEA checks resources for reorg job. UseResources is called before
    // initialising each of the volumes.
    // Resources are marked as invalid for each of the volumes.
    //
    m_resourcesValid = false;

    try {

        try {
            bea_VolInfo_t volume;

            // When initializing, type is always IVD.
            volume.type        = VOL_IVD;
            volume.volNum      = a_volume.volNum;
            volume.size        = a_volume.size;
            volume.sysVol      = (a_volume.sysVolNum == a_volume.volNum);
            volume.sysVolNum   = a_volume.sysVolNum;
            volume.medVolID    = string(a_volume.medVolID);
            volume.poolID      = string(a_volume.poolID);
            volume.partID      = string(a_volume.partID);
            volume.blockSize   = a_volume.blockSize;
            volume.accessNum   = a_volume.accessNum;
            volume.appendNum   = a_volume.appendNum;
            volume.owriteNum   = a_volume.owriteNum;
            volume.accessTime  = a_volume.accessTime;
            volume.appendTime  = a_volume.appendTime;
            volume.owriteTime  = a_volume.owriteTime;

            bea_Medium *med(m_drive_ap->GetMedium());

            // Append new volume if it doesn't exist yet
            if (   m_resources.mediumFamily == mf_DISK
                && volume.volNum > med->GetVolumeCount()) {

                // For disk medium only?

                med->AppendVolume(volume.size);
            }

            if (med->GetCurVolNumber() != volume.volNum) {
                med->ChangeVolume(volume.volNum);
            }
//          DebugBreak();
            med->GetCurrentVolume()->Init(volume);

            ostringstream sstr;
            sstr << "Vol " << a_volume.volNum << ": volume initialized.";
            log_WriteEvent(
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            if (m_jobType != jt_ADMIN) {
                // Init is called by the reorg job as well, which
                // calls UseResources for each of the volumes to be initialised.
                // Tape drive is reopened on each UseResources.
                m_drive_ap->Close();
            }
        }
        catch (ivd_Error& ie) {
            ostringstream sstr;
            sstr << "Vol " << a_volume.volNum
                 << ": volume init FAILED (" << ie.GetFriendly() << ").";

            log_WriteEvent(
                evt_ERROR,
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            (void)HandleError(ie, bea_OPWRITE);
            throw;
        }
        catch (ivd_Exception &ie) {
            ostringstream sstr;
            sstr << "Vol " << a_volume.volNum
                 << ": volume init FAILED (" << ie.GetFriendly() << ").";

            log_WriteEvent(
                evt_ERROR,
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            throw;
        }
        catch (...) {
            ostringstream sstr;
            sstr << "Vol " << a_volume.volNum << ": volume init FAILED.";
            log_WriteEvent(
                evt_ERROR,
                sstr.str(), "", m_jobID, m_drive_ap->GetMedium()->GetBarcode() );

            throw ivd_Error(
                ie_FATAL_ERROR, "Unknown exception initializing medium volume.");
        }
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

bool i_BackEndAgent_i::IsAborted (  )  const [inline]
void i_BackEndAgent_i::LogStats ( cmn_Time a_timeNeeded,
UInt64_t  a_bytes,
bea_OpType_t  a_opType 
)

Definition at line 1253 of file i_bea_impl.cpp.

References bea_OPREAD, bea_OPWRITE, GetJobID(), cmn_Time::GetMilliTime(), cmn_Time::GetTime_t(), log_FUNC_m, log_WriteEvent(), m_drive_ap, m_resources, and i_Resource_t::medVolNr.

Referenced by bea_MigrationThread::Migrate(), and bea_RecallThread::Recall().

                              {

    log_FUNC_m(LogStats);

    UInt64_t msec =
        UInt64_t(a_timeNeeded.GetTime_t()) * 1000 +
        a_timeNeeded.GetMilliTime();

    if (msec == 0) msec = 1;

    UInt64_t speed = (a_bytes * 1000) / (msec * 1024) ;

    ostringstream sstr;
    sstr << "Vol " << (m_resources.medVolNr);
    switch (a_opType) {
        case bea_OPREAD:
            sstr << ": Data read: ";
            break;
        case bea_OPWRITE:
            sstr << ": Data written: ";
            break;
        default:
            sstr << ": Data transfered: ";
            break;
    };

    sstr << (a_bytes/1024) << " KB (" << speed << " KB/s).";

    log_WriteEvent(
        sstr.str(), "",
        GetJobID(), m_drive_ap->GetMedium()->GetBarcode());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::Migrate (  ) 

Definition at line 784 of file i_bea_impl.cpp.

References cmn_ThreadCounter::GetCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_drive_ap, m_threadCounter, and cmn_Thread::Start().

                               {
    log_FUNC_m(Migrate);

    try {
        if (m_threadCounter.GetCount() > 0) {
            throw ivd_Error(ie_INVALID_ARG, "An operation thread is already running.");
        }

        bea_MigrationThread* beaMigration_p =
            new bea_MigrationThread(*this, m_drive_ap.get());

        beaMigration_p->Start();
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

bool i_BackEndAgent_i::MustReadPosition ( const bea_Medium *const   a_med_p  )  const

Definition at line 1173 of file i_bea_impl.cpp.

References ALWAYS, bmf_AIT, dbg_DETAIL, bea_Medium::GetMediumFamily(), log_DBG_m, log_FUNC_m, m_verifyPosition, NEVER, and NULL.

Referenced by bea_MigrationThread::WriteBlock().

                                                                             {
    switch (m_verifyPosition) {
        case ALWAYS: return true;
        case NEVER: return false;
        default:
        {
            if (a_med_p == NULL) {
                log_FUNC_m(MustReadPosition);
                log_DBG_m(dbg_DETAIL, "Default: med_p == NULL");
                return false;
            }
            else if (   a_med_p->GetMediumFamily() == bmf_AIT
                     || a_med_p->GetMediumFamily() == bmf_SAIT) {

                log_FUNC_m(MustReadPosition);
                log_DBG_m(dbg_DETAIL, "Medim family: AIT, SAIT. Read position.");
                return true;
            }
            else {
                return false;
            }
        };
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool i_BackEndAgent_i::MustVerifyHeader (  )  const [inline]

Definition at line 116 of file i_bea_impl.h.

References m_verifyHeader.

Referenced by bea_MigrationThread::PrepareVolume().

{return m_verifyHeader; };

Here is the caller graph for this function:

void i_BackEndAgent_i::ReadFastRecoveryInfo ( const i_VolInfoList_t a_volumes,
i_Index_t  a_sysVolNum 
)

Definition at line 865 of file i_bea_impl.cpp.

References log_FUNC_A_m, m_drive_ap, and cmn_Thread::Start().

                           {

    log_FUNC_A_m(ReadFastRecoveryInfo,
        "volumes.length(): " << a_volumes.length() <<
        " sysvol: " << a_sysVolNum);

    try {
        bea_FRIThread* beaFRI_p =
            new bea_FRIThread(*this, m_drive_ap.get(), a_volumes, a_sysVolNum, false);

        beaFRI_p->Start();
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_BackEndAgent_i::ReadIDs ( UInt32_t  a_medVolNum,
bool  a_readFromVolHeader 
)

Definition at line 991 of file i_bea_impl.cpp.

References bea_OPREAD, bea_Medium::ChangeVolume(), dbg_NORM, bea_Volume::GetBlockSize(), bea_Volume::GetPartitionID(), bea_Volume::GetPoolID(), bea_Medium::GetVolume(), bea_Volume::GetVolumeID(), bea_Volume::GetVolumeType(), HandleError(), cmn_UUID_t::IsNull(), log_DBG_m, log_FUNC_m, m_drive_ap, bea_Volume::ReadVolInfoFromHeader(), and VOL_OTHER.

Referenced by CloseMediumVolume(), GetVolInfo(), bea_MigrationThread::PrepareVolume(), bea_RecallThread::Run(), UseResources(), and VolDupRead().

                                                                             {
    log_FUNC_m(ReadIDs);

    if (a_medVolNum == 0) {
        return;
    }

    bea_Medium *med = m_drive_ap->GetMedium();
    bea_Volume *const vol = med->GetVolume(a_medVolNum);

    cmn_UUID_t volIDM, poolIDM, partIDM;
    UInt32_t blockSizeM(0);

    log_DBG_m(dbg_NORM, "Reading IDs on volume: " << a_medVolNum);

    if (vol->GetVolumeType() == VOL_IVD) {
        volIDM = vol->GetVolumeID();
        poolIDM = vol->GetPoolID();
        partIDM = vol->GetPartitionID();
        blockSizeM = vol->GetBlockSize();
    };

    if (   vol->GetVolumeType() == VOL_OTHER
        || volIDM.IsNull()
        || poolIDM.IsNull()
        || a_readFromVolHeader) {

        if (a_readFromVolHeader) {
            log_DBG_m(dbg_NORM, "Forced reading of IDs from volume header.");
        }
        else {
            log_DBG_m(dbg_NORM,
                "IDs not present in medium memory or medium memory not "
                "detected. Fallback to volume header.");
        }

        try {
            med->ChangeVolume(a_medVolNum);
            vol->ReadVolInfoFromHeader();
        }
        catch (ivd_Error &ie) {
            (void)HandleError(ie, bea_OPREAD);
            throw;
        }
    };
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::Recall (  ) 

Definition at line 801 of file i_bea_impl.cpp.

References cmn_ThreadCounter::GetCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_drive_ap, m_firstCall, m_threadCounter, and cmn_Thread::Start().

                              {
    log_FUNC_m(Recall);

    try {
        if (m_threadCounter.GetCount() > 0) {
            throw ivd_Error(ie_INVALID_ARG, "An operation thread is already running.");
        }

        bea_RecallThread* beaRecall_p =
            new bea_RecallThread(*this, m_drive_ap.get(), m_firstCall);

        beaRecall_p->Start();
        m_firstCall = false;
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_BackEndAgent_i::RecreateFastRecoveryInfo ( const i_VolInfoList_t a_volumes,
CORBA::Boolean  a_recovery,
const i_BoolList_t a_openVolList,
i_SysVolAction_e  a_svAction,
CORBA::Boolean  a_into,
const char *  a_intoPath 
)

Definition at line 883 of file i_bea_impl.cpp.

References log_FUNC_A_m, m_drive_ap, NULL, and cmn_Thread::Start().

                                        {

    log_FUNC_A_m(RecreateFastRecoveryInfo,
        "volumes.length(): " << a_volumes.length() <<
        " recovery: " << (a_recovery ? "Yes" : "No") <<
        " svAction: " << a_svAction );

    try {
        bea_FRIThread* beaFRI_p =
            new bea_FRIThread(
                *this,
                m_drive_ap.get(),
                a_volumes,
                0,
                true,
                a_openVolList,
                a_recovery,
                a_svAction,
                a_into,
                a_intoPath);

        if (a_recovery) {
            // Start separate thread (async operation for check job)
            beaFRI_p->Start();
        }
        else {
            // Run in this scope (admin job)
            auto_ptr<bea_FRIThread> fri_p(beaFRI_p);
            fri_p->Run(NULL);
        }
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_BackEndAgent_i::RecreateMIC ( const i_VolInfo_t a_volume  ) 

Definition at line 963 of file i_bea_impl.cpp.

References log_FUNC_A_m, and i_VolInfo_t::volNum.

                                                              {
    log_FUNC_A_m(RecreateMIC,
        "a_volume.volNum = " << a_volume.volNum);
}

void i_BackEndAgent_i::ReleaseResources (  ) 
void i_BackEndAgent_i::Remove (  )  [virtual]

Reimplemented from i_Component_i.

Definition at line 970 of file i_bea_impl.cpp.

References cmn_Condition::Broadcast(), log_FUNC_m, m_aborted, m_res_c, and m_res_x.

                              {
    log_FUNC_m(Remove);

    {
        cmn_MutexLock l(m_res_x);
        m_aborted = true;

        // Wake up threads that wait for resources.
        m_res_c.Broadcast();
    };

    try {
        i_Component_i::Remove();
    }
    ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_BackEndAgent_i::RequestNewResources (  ) 

Definition at line 1230 of file i_bea_impl.cpp.

References dbg_NORM, ipc_EXEC_m, log_DBG_m, log_FUNC_m, m_beaNumber, m_job, and ReleaseResources().

Referenced by bea_MigrationThread::ExchangeResources().

                                           {
    log_FUNC_m(RequestNewResources);

    log_DBG_m(dbg_NORM, "Requesting new resources.");

    ReleaseResources();
    ipc_EXEC_m(
        m_job->GetNewResources(m_beaNumber);
    );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::SysVolErased (  )  [inline]

Definition at line 122 of file i_bea_impl.h.

References m_sysVolErased.

Referenced by bea_FRIThread::EraseSysVol().

{ m_sysVolErased = true; };

Here is the caller graph for this function:

void i_BackEndAgent_i::UpdateDriveIDs ( Int32_t  a_driveKey  ) 

Definition at line 1553 of file i_bea_impl.cpp.

References dbg_LOW, dbg_NORM, evt_ERROR, evt_WARNING, ivd_BaseException::GetFriendly(), GetRM(), ie_BEA_HWID, ipc_EXEC_m, ivd_Error, log_DBG_m, log_FUNC_m, log_WriteEvent(), m_drive_ap, m_jobID, m_verifyHeader, mf_UNKNOWN, and UpdateDriveIDs().

                                                        {
    log_FUNC_m(UpdateDriveIDs);

    i_ResourceManager_var   rm = GetRM();
    bea_Medium*             bm(m_drive_ap->GetMedium());
    i_Drive_t_var           drive;
    bool                    needsUpdate(false);

    // Failure reading the RMDB is propagated out
    ipc_EXEC_m(
        drive = rm->SelectDriveByKey(a_driveKey);
    );

    i_Type_t family = bm->GetRMFamily();
    if (drive->mediaFamily != family) {
        if (drive->mediaFamily != mf_UNKNOWN) {
            ostringstream sstr;
            sstr
                << drive->driveName
                << ": RMDB contained wrong medium family ("
                << drive->mediaFamily << "). Corrected to "
                << family << ".";
            log_WriteEvent(
                evt_WARNING, sstr.str(), "", m_jobID,
                (const char*)(drive->driveName) );
        }
        else {
            log_DBG_m(dbg_LOW, "Updating medium family: " << family);
        }
        drive->mediaFamily = family;
        needsUpdate = true;
    }

    const string& vid = m_drive_ap->GetVendorID();
    if (vid.compare(drive->vendorID) != 0) {
        if (strlen(drive->vendorID) > 0) {
            ostringstream sstr;
            sstr
                << drive->driveName
                << ": Wrong vendor ID: " << vid
                << " Expected (RM): " << drive->vendorID << ".";
            log_WriteEvent(
                evt_ERROR, sstr.str(), "", m_jobID,
                (const char*)(drive->driveName) );

            throw ivd_Error(ie_BEA_HWID, sstr.str());
        }
        else {
            log_DBG_m(dbg_LOW, "Updating vendor ID: " << vid);
        }
        drive->vendorID = CORBA::string_dup(vid.c_str());
        needsUpdate = true;
    };

    const string& pid = m_drive_ap->GetProductID();
    if (pid.compare(drive->productID) != 0) {
        if (strlen(drive->productID) > 0) {
            ostringstream sstr;
            sstr
                << drive->driveName
                << ": Wrong product ID: " << pid
                << " Expected (RM): " << drive->productID << ".";
            log_WriteEvent(
                evt_ERROR, sstr.str(), "", m_jobID,
                (const char*)(drive->driveName) );

            throw ivd_Error(ie_BEA_HWID, sstr.str());
        }
        else {
            log_DBG_m(dbg_LOW, "Updating product ID: " << pid);
        }
        drive->productID = CORBA::string_dup(pid.c_str());
        needsUpdate = true;
    };

    const string& rev = m_drive_ap->GetProductRevision();
    if (rev.compare(drive->firmwareRev) != 0) {
        if (strlen(drive->firmwareRev) > 0) {
            ostringstream sstr;
            sstr
                << drive->driveName
                << ": Changed product revision from " << drive->firmwareRev
                << " to " << rev << ".";
            log_WriteEvent(
                evt_WARNING, sstr.str(), "", m_jobID,
                (const char*)(drive->driveName) );
        }
        else {
            log_DBG_m(dbg_LOW, "Updating product revision: " << rev);
        }
        drive->firmwareRev = CORBA::string_dup(rev.c_str());
        needsUpdate = true;
    };

    string sid = m_drive_ap->GetSCSIID();
    if (sid.compare(drive->scsiID) != 0) {
        if (strlen(drive->scsiID) > 0) {
            ostringstream sstr;
            sstr
                << drive->driveName
                << ": Changed SCSI ID from " << drive->scsiID
                << " to " << sid << ".";
            log_WriteEvent(
                evt_WARNING, sstr.str(), "", m_jobID,
                (const char*)(drive->driveName) );
        }
        else {
            log_DBG_m(dbg_LOW, "Updating SCSI ID: " << rev);
        }
        drive->scsiID = CORBA::string_dup(sid.c_str());
        needsUpdate = true;
    };

    const string& sn = m_drive_ap->GetSerialNumber();
    if (sn.compare(drive->serialNo) != 0) {
        if (strlen(drive->serialNo) > 0) {
            ostringstream sstr;
            sstr
                << drive->driveName
                << ": Changed serial number from " << drive->serialNo
                << " to " << sn << ".";
            log_WriteEvent(
                evt_WARNING, sstr.str(), "", m_jobID,
                (const char*)(drive->driveName) );
        }
        else {
            log_DBG_m(dbg_LOW, "Updating s/n: " << drive->serialNo);
        }
        drive->serialNo = CORBA::string_dup(sn.c_str());
        needsUpdate = true;
    };

    try {
        if (needsUpdate) {
            m_verifyHeader = true;
            ipc_EXEC_m(
                rm->UpdateDrive(drive);
            );
        }
    }
    catch (const ivd_Exception& ie) {
        log_DBG_m(dbg_NORM, "Error updating RMDB: " << ie.GetFriendly());
    }
    catch (...) {
        log_DBG_m(dbg_NORM, "Error updating RMDB. ");
    }
}

Here is the call graph for this function:

void i_BackEndAgent_i::UpdateDriveIDs (  ) 

Referenced by UpdateDriveIDs(), and UseResources().

Here is the caller graph for this function:

void i_BackEndAgent_i::UpdateMediumIDs (  ) 

Definition at line 1493 of file i_bea_impl.cpp.

References dbg_LOW, dbg_NORM, ivd_BaseException::GetFriendly(), GetRM(), ipc_EXEC_m, log_DBG_m, log_FUNC_m, log_WRN_m, m_drive_ap, and mt_UNKNOWN.

Referenced by UseResources().

                                       {
    log_FUNC_m(UpdateMediumIDs);

    i_ResourceManager_var   rm = GetRM();
    i_Medium_t_var          medium;
    bea_Medium*             bm(m_drive_ap->GetMedium());
    string                  barcode(bm->GetBarcode());
    bool                    needsUpdate(false);

    // RMDB failure is propagated.
    ipc_EXEC_m(
        medium = rm->SelectMedium(CORBA::string_dup(barcode.c_str()));
    );

    i_Type_t type = bm->GetRMType();
    if (medium->mediumType != type) {
        if (medium->mediumType != mt_UNKNOWN) {
            log_WRN_m(
                barcode <<
                ": RMDB contained wrong medium type (" << medium->mediumType <<
                "). Corrected to " << type << "."
            );
        }
        else {
            log_DBG_m(dbg_LOW, "Updating medium type: " << type);
        }
        medium->mediumType = type;
        needsUpdate = true;
    }

    const string& sn = bm->GetSerialNumber();
    if (sn.compare(medium->mediumSerialNo) != 0) {
        if (strlen(medium->mediumSerialNo) > 0) {
            log_WRN_m(
                barcode <<
                ": RMDB contained wrong s/n (" << medium->mediumSerialNo <<
                "). Corrected to " << sn << "."
            );
        }
        medium->mediumSerialNo = CORBA::string_dup(sn.c_str());
        needsUpdate = true;
    }

    try {
        if (needsUpdate) {
            ipc_EXEC_m(
                rm->UpdateMedium(medium);
            );
        }
    }
    catch (const ivd_Exception& ie) {
        log_DBG_m(dbg_NORM, "Error updating RMDB: " << ie.GetFriendly());
    }
    catch (...) {
        log_DBG_m(dbg_NORM, "Error updating RMDB. ");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::UpdateVolumeUsed (  ) 

Definition at line 1291 of file i_bea_impl.cpp.

References cfg_MEGABYTE, dbg_LOW, dbg_NORM, bea_Volume::GetBlockSize(), bea_Volume::GetEstimRemainingSize(), bea_Volume::GetEstimTotalSize(), bea_Volume::GetPosition(), GetRM(), bea_Volume::GetVolumeID(), bea_Volume::GetVolumeNumber(), log_DBG_m, log_FUNC_m, log_WRN_m, m_drive_ap, cmn_UUID_t::ToString(), and bea_MediumMemory::UpdateAppend().

Referenced by bea_MigrationThread::Run(), and bea_FRI::WriteFRI().

                                        {
    log_FUNC_m(UpdateVolumeUsed);

    bea_Volume *const vol = m_drive_ap->GetMedium()->GetCurrentVolume();
    try {
        UInt32_t remaining = vol->GetEstimRemainingSize();
        UInt64_t total = vol->GetEstimTotalSize();

        UInt64_t totalData =
            (UInt64_t(vol->GetPosition()) * vol->GetBlockSize()) / cfg_MEGABYTE;

        UInt64_t percent = ( (total-remaining) * 100)/total;

        percent = (percent == 0) ? 1 : percent;
        double compRate(0);
        if (totalData > 0){
            compRate = double(total-remaining)/totalData;
        }

        log_DBG_m(dbg_NORM,
            endl << "barcode:vol = " << m_drive_ap->GetMedium()->GetBarcode() <<
                    ":" << vol->GetVolumeNumber() <<
            endl << "Total     space: " << total <<
            endl << "Remaining space: " << remaining <<
            endl << "TotalData space: " << totalData <<
            endl << "Percent used   : " << percent <<
            endl << "CompRate       : " << fixed << setprecision(2)
                                        << compRate );

        log_DBG_m(dbg_LOW,
            "Updating RMDB with volume usage: " << percent << "%" <<
            " totalData: " << totalData << " MB " <<
            " for " << vol->GetVolumeID() );

        i_ResourceManager_var rm = GetRM();

        rm->VolumeUsage(
            CORBA::string_dup(vol->GetVolumeID().ToString().c_str()),
            static_cast<CORBA::Long>(percent),
            static_cast<i_VolSize_t>(totalData) );
    }
    catch (...) {
        log_WRN_m("Can't update % used for medium volume: " << vol->GetVolumeID());
    }

    try {
        if (m_drive_ap->GetMedium()->IsMediumMemValid()) {
            bea_MediumMemory* mm = m_drive_ap->GetMedium()->GetMediumMem();

            mm->UpdateAppend(vol->GetVolumeNumber());
        }
    }
    catch(ivd_Exception &ie) {
        log_DBG_m(dbg_LOW, "Error updating MIC. Ignored: " << ie );
    }

}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::UseResources ( const i_Resource_t a_res  ) 

Definition at line 160 of file i_bea_impl.cpp.

References i_Resource_t::barcode, bea_OPWRITE, bea_verifyHdr_c(), i_Resource_t::blockSize, cmn_Condition::Broadcast(), cmn_GetEnvVariable(), cmn_StrUpperCase(), bea_Drive::CreateDrive(), dbg_DETAIL, dbg_LOW, dbg_NORM, i_Resource_t::driveCtrlDevice, i_Resource_t::driveKey, cmn_Global::evt, evt_ERROR, evt_WARNING, g_cmn, ivd_BaseException::GetError(), GetJobID(), GetMedVolNumber(), GetRM(), HandleError(), ie_BEA_WORM, ie_INVALID_ARG, ie_MEDIUM_MEDERR, ie_PRECONDITION, bea_MediumMemory::IncLoadCount(), ipc_EXEC_m, ivd_Error, ivd_MediaFamilyToText(), jt_ADMIN, jt_MAINT, jt_MIGRATION, jt_RECOVERY, i_Resource_t::load, log_DBG_m, log_FUNC_m, log_WriteEvent(), ipc_Log::LogResources(), m_bufferID, m_diskBufferFS, m_drive_ap, m_job, m_jobID, m_jobType, m_res_c, m_res_x, m_resources, m_resourcesValid, m_sysVolErased, m_verifyHeader, i_Resource_t::mediumFamily, i_Resource_t::mediumKey, i_Resource_t::medVolId, i_Resource_t::medVolNr, mf_DISK, i_Resource_t::poolKey, i_Resource_t::poolType, i_Resource_t::poolUUID, pt_WORM, ReadIDs(), log_EventLogger::SetQualifier(), UpdateDriveIDs(), UpdateMediumIDs(), and VerifyIDs().

                                                             {
    log_FUNC_m(UseResources);

    try {
        if (m_resourcesValid) {
            log_MARKLINE_m;
            ostringstream sstr;
            sstr
                << "Assigned:" << endl << ipc_Log::LogResources(m_resources) << endl
                << "New:" << endl << ipc_Log::LogResources(a_res);

            throw ivd_Error(
                ie_PRECONDITION, "BUG: Back end agent already has valid resources. ",
                sstr.str(), true);
        };

        log_DBG_m(dbg_LOW,
            "BEA got resources:" << endl <<
            ipc_Log::LogResources(a_res) );

        string verifyHdr = cmn_GetEnvVariable(bea_verifyHdr_c);
        if (verifyHdr.length() > 0) {
            log_DBG_m(dbg_LOW, bea_verifyHdr_c << " = " << verifyHdr << ".");
            cmn_StrUpperCase(verifyHdr);

            if (a_res.mediumFamily == mf_DISK) {
                log_DBG_m(dbg_LOW, "Volume header for disk volume is verified always.");
                m_verifyHeader = true;
            }
            else if (verifyHdr.compare("NO") == 0 || verifyHdr.compare("FALSE") == 0) {
                m_verifyHeader = false;
            }
        }

        //
        // m_resources are used if opening a drive returns an error
        // to mark the error in the rmdb.
        // Resources are not yet valid: see m_resourcesValid
        // at the end of the function.
        //
        m_resources     = a_res;

        ipc_EXEC_m(
            i_JobParams_var jobParams  = m_job->GetJobParams();

            m_bufferID = jobParams->bufId;
            m_diskBufferFS = jobParams->diskBufferFS;
        );

        //
        // Basic verification of input parameters
        //
        UInt32_t mediumKey(a_res.mediumKey);
        string scsiID(a_res.driveCtrlDevice);

        if (mediumKey == 0) {
            log_MARKLINE_m;
            ostringstream sstr;
            sstr
                << "BUG: Job assigned medium key == 0. "
                << " Job: " << GetJobID()
                << " Medium/volume num: "
                << m_resources.barcode << "/" << GetMedVolNumber();

            throw ivd_Error(ie_INVALID_ARG, sstr.str(), true);
        };

        try {
            m_drive_ap.reset(bea_Drive::CreateDrive(a_res.mediumFamily));

            //
            // Open tape drive
            //
            m_drive_ap->Open( scsiID, string(a_res.barcode), m_jobID );
            g_cmn.evt.SetQualifier(scsiID);

            if (a_res.load) {
                log_DBG_m(dbg_NORM, "About to increase load count.");
                if (m_drive_ap->GetMedium()->IsMediumMemValid()) {
                    bea_MediumMemory* mm =
                        m_drive_ap->GetMedium()->GetMediumMem();
                    mm->IncLoadCount();
                }
                m_verifyHeader = true;
            }
            if (m_drive_ap->WasMediumChanged()) {
                log_DBG_m(dbg_LOW,
                    "Medium most probably changed. Header will be verified.");
                m_verifyHeader = true;
            }
        }
        catch (ivd_Error &ie) {
            (void)HandleError(ie);
            throw;
        };

        cmn_UUID_t volID(string(a_res.medVolId));
        cmn_UUID_t poolID(string(a_res.poolUUID));

        // job_RECALL, job_MIGRATION, job_REORG,
        // job_ADMIN, job_BACKUP, job_RECOVERY, job_MAINT

        if (   m_jobType == jt_ADMIN
            || m_jobType == jt_RECOVERY
            || m_jobType == jt_MAINT) {

            log_DBG_m(dbg_LOW, "BEA won't verify IDs for this job yet.");
        }
        else if (m_drive_ap->GetMedium()->IsMediumMemValid()) {
            // If medium memory is detected and it is valid then verify the IDs
            // for all other jobs
            //If it fails, check what is specified in trace.cfg
            //for checking IDs in medium header
            log_DBG_m(dbg_DETAIL, "Medium memory is detected and it and it contains valid cookies.");
            bool verifyHeaderError(false);
            try {
                VerifyIDs(string(a_res.barcode), a_res.medVolNr, a_res.blockSize, volID, poolID);
            }
            catch (const ivd_Error) {
                log_DBG_m(dbg_LOW,
                    "Error verifying IDs in medium memory. Check if it is needed to read from header.");
                verifyHeaderError = true;
            }
            if (verifyHeaderError && m_verifyHeader){
                try{
                    try{
                        ReadIDs(a_res.medVolNr, true);
                        VerifyIDs(
                            string(a_res.barcode),
                            a_res.medVolNr,
                            a_res.blockSize,
                            volID,
                            poolID);
                    }
                    catch (const ivd_Error& e) {
                        if (e.GetError() == ie_BEA_INVVOLID){
                            //If header is not correct, medium error is returned,
                            //Handle error will set medium to unreliable
                            throw ivd_Error(ie_MEDIUM_MEDERR, "Marking medium as unreliable. Header is not correct!", true);
                        }
                        else throw;
                    }
                }catch (const ivd_Error& e){
                    //HandleError will set medium to unreliable
                    (void)HandleError(e, bea_OPWRITE);
                    throw;
                 }
            }
            else if (!verifyHeaderError){
                log_DBG_m(dbg_LOW, "No need to verify header. Info from MAM/MIC is OK ");
                }
                else {
                    ostringstream eventText;
                    eventText << "Reading from MAM/MIC has failed and header for media " << string(a_res.barcode);
                    eventText << " is not verified" << endl;
                    eventText << "Check in trace.cfg if HSM_BEA_VERIFY_HEADER is set to yes";
                    log_WriteEvent(evt_WARNING, eventText.str());
                }
        }
        else {
            log_DBG_m(dbg_DETAIL, "Medium memory is not detected or does not contain valid cookies.");
            if (m_jobType == jt_MIGRATION) {
                if (m_verifyHeader) {
                    try{
                        // Check medium IDs for migration.
                        // Writing part of reorg checks before writing
                        log_DBG_m(dbg_DETAIL, "Header will be read and verified.");
                        try{
                            ReadIDs(a_res.medVolNr, true);
                            VerifyIDs(string(a_res.barcode), a_res.medVolNr, a_res.blockSize, volID, poolID);
                        }
                        catch (const ivd_Error& e) {
                            if (e.GetError() == ie_BEA_INVVOLID){
                                //If header is not correct, medium error is returned,
                                //Handle error will set medium to unreliable
                                throw ivd_Error(ie_MEDIUM_MEDERR, "Marking medium as unreliable. Header is not correct!", true);
                            }
                            else throw;
                        }
                    }
                    catch (const ivd_Error& e){
                        //HandleError will set medium to unreliable
                        (void)HandleError(e, bea_OPWRITE);
                        throw;
                    }
                }
                else {
                    log_DBG_m(dbg_LOW, "Header won't be read and verified.");
                    ostringstream eventText;
                    eventText << "Reading from MAM/MIC has failed and header for media " << string(a_res.barcode);
                    eventText << " is not verified" << endl;
                    eventText << "Check in trace.cfg if HSM_BEA_VERIFY_HEADER is set to yes";
                    log_WriteEvent(evt_WARNING, eventText.str());
                }
            }
        }

        if (a_res.driveKey > 0) {
            UpdateDriveIDs(Int32_t(a_res.driveKey));
        }

        UpdateMediumIDs();

        if (a_res.poolKey > 0) {
            //media family check
            if (a_res.mediumFamily != m_drive_ap->GetMedium()->GetRMFamily()) {

                ivd_MediaFamily_e mfMedium =
                    static_cast<ivd_MediaFamily_e>(m_drive_ap->GetMedium()->GetRMFamily());

                ivd_MediaFamily_e mfPool =
                    static_cast<ivd_MediaFamily_e>(a_res.mediumFamily);

                ostringstream msg;
                msg << "Medium family does not match. ";
                msg << "Medium family is "
                    << ivd_MediaFamilyToText(mfMedium)
                    << ". ";
                msg << "Medium is assigned to pool with family: "
                    << ivd_MediaFamilyToText(mfPool)
                    << ".";
                throw ivd_Error(
                    ie_PRECONDITION, msg.str(), true);
            }


            // WORM checks
            if (a_res.poolType == pt_WORM) {
                if (!m_drive_ap->GetMedium()->IsWORM()) {
                    i_ResourceManager_var rm = GetRM();
                    log_WriteEvent(
                        evt_ERROR, "Non-WORM medium in WORM pool. Marking medium as unusable.", "",
                        m_jobID, string(m_resources.barcode) );

                    rm->MediumUnusable(m_resources.mediumKey);
                    throw ivd_Error(ie_BEA_WORM, "Non-WORM medium in WORM pool.");
                }
            }
            else {
                if (m_drive_ap->GetMedium()->IsWORM()) {
                    throw ivd_Error(ie_BEA_WORM, "WORM medium in non-WORM pool.");
                }
            }
        }
        else {
            log_DBG_m(dbg_LOW,"Medium not assigned to any pool: " << a_res.barcode);
        }

    } ipc_CATCH_IVD_THROW_CORBA_m;

    m_sysVolErased = false;

    log_DBG_m(dbg_NORM, "Resources checked and assigned.");

    {
        cmn_MutexLock l(m_res_x);
        m_resourcesValid = true;
        m_res_c.Broadcast();
    };
}

Here is the call graph for this function:

void i_BackEndAgent_i::VerifyIDs ( const string &  a_barcode,
UInt32_t  a_medVolNum,
UInt32_t  a_blockSize,
const cmn_UUID_t a_volID,
const cmn_UUID_t a_poolID 
)

Definition at line 1040 of file i_bea_impl.cpp.

References dbg_LOW, dbg_NORM, evt_ERROR, evt_WARNING, bea_Volume::GetBlockSize(), GetJobID(), bea_Volume::GetPartitionID(), bea_Volume::GetPoolID(), bea_Medium::GetVolume(), bea_Volume::GetVolumeID(), bea_Volume::GetVolumeNumber(), bea_Volume::GetVolumeType(), ie_BEA_INVVOLFMT, ie_BEA_INVVOLID, cmn_UUID_t::IsNull(), ivd_Error, jt_ADMIN, jt_MIGRATION, jt_RECALL, jt_REORG, log_DBG_m, log_FUNC_m, log_WriteEvent(), m_drive_ap, m_jobType, and m_partID.

Referenced by bea_MigrationThread::PrepareVolume(), bea_RecallThread::Run(), UseResources(), and VolDupRead().

                                  {

    log_FUNC_m(VerifyIDs);

    bea_Medium *med = m_drive_ap->GetMedium();
    bea_Volume *const vol = med->GetVolume(a_medVolNum);

    //
    // Verify IDs only if passed ids are not null.
    //
    if (a_volID.IsNull() || a_poolID.IsNull()) {
        if (   m_jobType == jt_MIGRATION
            || m_jobType == jt_RECALL
            || m_jobType == jt_REORG) {

            // Redundany copy job is of type MAINT and can't be detected here.
            // This verification before reading and writing can't be implemented.
            // Check is done in Run() functions of the threads.

            ostringstream sstr;
            sstr
                << "Vol " << vol->GetVolumeNumber()
                << ": job passed null medium volume ID.";

            log_WriteEvent(
                evt_ERROR, sstr.str(), "",
                GetJobID(), string(a_barcode) );

            throw ivd_Error(ie_BEA_INVVOLID, sstr.str());
        }

        log_DBG_m(dbg_LOW,
            "Volume or pool ID is null. IDs won't be verified.");
        return;
    }

    cmn_UUID_t volIDM, poolIDM, partIDM;
    UInt32_t blockSizeM(0);

    log_DBG_m(dbg_NORM, "Verifying IDs on volume: " << a_medVolNum);

    if (vol->GetVolumeType() == VOL_IVD) {
        volIDM = vol->GetVolumeID();
        poolIDM = vol->GetPoolID();
        partIDM = vol->GetPartitionID();
        blockSizeM = vol->GetBlockSize();
    };

    if (vol->GetVolumeType() != VOL_IVD) {
        ostringstream sstr;
        sstr
            << "Vol " << vol->GetVolumeNumber()
            << ": medium volume type in drive is not IVD but "
            << vol->GetVolumeType();

        log_WriteEvent(
            evt_WARNING, sstr.str(), "",
            GetJobID(), string(a_barcode) );

        throw ivd_Error(ie_BEA_INVVOLFMT);
    }

    if (volIDM != a_volID) {
        ostringstream sstr;
        sstr
            << "Vol " << vol->GetVolumeNumber()
            << ": medium volume in drive does not match expected: "
            << volIDM << " (expected: " << a_volID << ").";

        log_WriteEvent(
            evt_WARNING, sstr.str(), "",
            GetJobID(), string(a_barcode) );

        throw ivd_Error(ie_BEA_INVVOLID);
    }
    if (poolIDM != a_poolID) {
        ostringstream sstr;
        sstr
            << "Vol " << vol->GetVolumeNumber()
            << ": pool ID of medium volume in drive does not match expected: "
            << poolIDM << " (expected: " << a_poolID << ").";

        log_WriteEvent(
            evt_WARNING, sstr.str(), "",
            GetJobID(), string(a_barcode) );

        throw ivd_Error(ie_BEA_INVVOLID);
    };

    if (m_jobType != jt_ADMIN && partIDM != m_partID) {
        ostringstream sstr;
        sstr
            << "Vol " << vol->GetVolumeNumber()
            << ": partition ID of medium volume "
            "in drive does not match expected: "
            << partIDM << " (expected: " << m_partID << ").";

        log_WriteEvent(
            evt_WARNING, sstr.str(), "",
            GetJobID(), string(a_barcode) );

        throw ivd_Error(ie_BEA_INVVOLID);
    };

    if (blockSizeM != a_blockSize) {
        ostringstream sstr;
        sstr
            << "Vol " << vol->GetVolumeNumber()
            << ": block size of medium volume "
            "in drive does not match expected: "
            << blockSizeM << " (expected: " << a_blockSize << ").";

        log_WriteEvent(
            evt_WARNING, sstr.str(), "",
            GetJobID(), string(a_barcode) );

        throw ivd_Error(ie_BEA_INVVOLID);
    };
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_BackEndAgent_i::VolDupRead (  ) 

Definition at line 924 of file i_bea_impl.cpp.

References i_Resource_t::barcode, GetMedVolBlockSize(), GetMedVolNumber(), log_FUNC_m, m_drive_ap, m_resources, i_Resource_t::medVolId, i_Resource_t::poolUUID, ReadIDs(), cmn_Thread::Start(), and VerifyIDs().

                                  {
    log_FUNC_m(VolDupRead);

    try {
        cmn_UUID_t volID(string(m_resources.medVolId));
        cmn_UUID_t poolID(string(m_resources.poolUUID));

        ReadIDs(GetMedVolNumber(), true);

        VerifyIDs(
            string(m_resources.barcode), GetMedVolNumber(),
            GetMedVolBlockSize(), volID, poolID);

        bea_DupReadThread* beaDup_p = new bea_DupReadThread(*this, m_drive_ap.get());

        beaDup_p->Start();
    } ipc_CATCH_IVD_THROW_CORBA_m;

}

Here is the call graph for this function:

void i_BackEndAgent_i::VolDupWrite ( i_VolSize_t  a_volSize,
CORBA::Boolean  a_appendVolume,
CORBA::Boolean  a_srcMediumFull 
)

Definition at line 946 of file i_bea_impl.cpp.

References log_FUNC_A_m, m_drive_ap, and cmn_Thread::Start().

                                                                                      {

    log_FUNC_A_m(VolDupWrite,
        "size: " << a_volSize << " append: " << a_appendVolume);

    try {
        bea_DupWriteThread* beaDup_p = new bea_DupWriteThread(
            *this, m_drive_ap.get(), a_volSize, a_appendVolume, a_srcMediumFull);

        beaDup_p->Start();
    } ipc_CATCH_IVD_THROW_CORBA_m;

}

Here is the call graph for this function:

void i_BackEndAgent_i::WaitForResources (  ) 
bool i_BackEndAgent_i::WasSysVolErased (  )  const [inline]

Definition at line 123 of file i_bea_impl.h.

References m_sysVolErased.

Referenced by bea_FRIThread::EraseSysVol().

{ return m_sysVolErased; };

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from i_Component_i.

Definition at line 154 of file i_bea_impl.h.

Definition at line 172 of file i_bea_impl.h.

Referenced by IsAborted(), Remove(), and WaitForResources().

Definition at line 166 of file i_bea_impl.h.

Referenced by GetBEANumber(), i_BackEndAgent_i(), and RequestNewResources().

Definition at line 170 of file i_bea_impl.h.

Referenced by GetBufferID(), i_BackEndAgent_i(), and UseResources().

Definition at line 171 of file i_bea_impl.h.

Referenced by GetDiskBufferFS(), i_BackEndAgent_i(), and UseResources().

Definition at line 161 of file i_bea_impl.h.

Referenced by GetSeekThreshold(), and i_BackEndAgent_i().

Definition at line 180 of file i_bea_impl.h.

Referenced by Recall().

i_Job_var i_BackEndAgent_i::m_job [private]

Definition at line 164 of file i_bea_impl.h.

Referenced by GetJob(), i_BackEndAgent_i(), RequestNewResources(), and UseResources().

Definition at line 169 of file i_bea_impl.h.

Referenced by GetJobType(), i_BackEndAgent_i(), Init(), UseResources(), and VerifyIDs().

Definition at line 168 of file i_bea_impl.h.

Referenced by GetMigrationID(), and i_BackEndAgent_i().

Definition at line 162 of file i_bea_impl.h.

Referenced by GetPartitionID(), i_BackEndAgent_i(), and VerifyIDs().

Definition at line 178 of file i_bea_impl.h.

Referenced by Remove(), UseResources(), and WaitForResources().

Definition at line 177 of file i_bea_impl.h.

Referenced by ReleaseResources(), Remove(), UseResources(), and WaitForResources().

i_ResourceManager_var i_BackEndAgent_i::m_rm [private]

Definition at line 165 of file i_bea_impl.h.

Referenced by GetRM().

Definition at line 175 of file i_bea_impl.h.

Referenced by SysVolErased(), UseResources(), and WasSysVolErased().

Definition at line 174 of file i_bea_impl.h.

Referenced by MustVerifyHeader(), UpdateDriveIDs(), and UseResources().

Definition at line 173 of file i_bea_impl.h.

Referenced by i_BackEndAgent_i(), and MustReadPosition().


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