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

fsc_VolumeCheck Class Reference
[File System Catalog]

#include <fsc_VolumeCheck.h>

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

List of all members.

Public Member Functions

 fsc_VolumeCheck (fsc_DataLMgr &a_dataLMgr, const cmn_Path &a_fscDirectory, const string &a_partitionName, const cmn_UUID_t &a_volumeID, ui_MsgWriter &a_msgWrite, ivd_MedVolNum_t a_medVolNum, ivd_MediaKey_t a_mediaKey, df_BlockProxy *a_reader, bool a_autoCorrect, bool a_removeMissingOnMedia, ivd_MediaChkStat_t &a_checkStat, UInt32_t a_lastDataPosition=0)
virtual ~fsc_VolumeCheck ()

Public Attributes

 log_CLASSID_m
 Macro to add class name member s_className.

Private Member Functions

virtual void ProcSplitInfo (df_SplitInfo *a_splitInfo)
 when one split info is parsed then call ProcSplitInfo()
void Check (df_SplitInfo &a_splitInfo)
void DisplayMessage (fsc_medVolData_t &a_mvd, fsc_nsElement *a_nsElement_p, df_SplitInfo &a_splitInfo, string &a_status, UInt32_t a_fieldStatus)
void DisplayMessage (df_SplitInfo &a_splitInfo, string &a_status)
fsc_medVolData_tFindMVD (df_SplitInfo &a_splitInfo)
void GetNextOfsSubBlock ()
void RestDataHandle ()

Private Attributes

fsc_DataLMgrm_dataLMgr
 to update FSC in case of split missing
fsc_medVolData_tm_sameOfsBlockBeg
 first entry of current offset
fsc_medVolData_tm_sameOfsBlockEnd
 next offset
fsc_medVolData_tm_buffEnd_p
 This is set by MedVolume class NOTE: fsc_VolumeCheck modify buffer to know which rec was already handled fileID is modified field and is set to 0 after use.
ivd_BlockOffset_t m_currentBlockOffset
 from which block offset are data in m_volData_v
string m_partitionName
 check output file name is constructed with partitionName
fsc_MedVolReader m_medVolRead
 media volume reader, reads prepared file by FSC NOTE: this class modify buffer got from m_medVolRead
ui_MsgWriterm_msgWrite
 writes mismatch to client output
bool m_autoCorrect
 if set then add missing split to FSC
bool m_removeMissingOnMedia
 if set then remove splits from FSC that missing on media
ivd_MediaChkStat_tm_checkStat
 statistic collection recod

Detailed Description

Definition at line 50 of file fsc_VolumeCheck.h.


Constructor & Destructor Documentation

fsc_VolumeCheck::fsc_VolumeCheck ( fsc_DataLMgr a_dataLMgr,
const cmn_Path a_fscDirectory,
const string &  a_partitionName,
const cmn_UUID_t a_volumeID,
ui_MsgWriter a_msgWrite,
ivd_MedVolNum_t  a_medVolNum,
ivd_MediaKey_t  a_mediaKey,
df_BlockProxy a_reader,
bool  a_autoCorrect,
bool  a_removeMissingOnMedia,
ivd_MediaChkStat_t a_checkStat,
UInt32_t  a_lastDataPosition = 0 
)

Definition at line 54 of file fsc_VolumeCheck.cpp.

References dbg_DETAIL, GetNextOfsSubBlock(), log_DBG_m, log_FUNC_m, m_buffEnd_p, m_sameOfsBlockBeg, m_sameOfsBlockEnd, and NULL.

    :
    df_SplitInfoUnpacker(a_medVolNum,
                         a_mediaKey,
                         a_reader,
                         false,
                         a_lastDataPosition,
                         a_volumeID),
    m_dataLMgr(a_dataLMgr),
//    m_trans(a_trans),
//    m_sameOfsBlockBeg(NULL),
//    m_sameOfsBlockEnd(NULL), // set by m_medVolRead constructor
//    m_buffEnd_p(NULL),
    m_currentBlockOffset(0),
    m_partitionName(a_partitionName),
    m_medVolRead(a_fscDirectory,  // can throw ivd_Error if no file found
                 a_mediaKey,
                 a_medVolNum,
                 m_sameOfsBlockBeg,
                 m_buffEnd_p,
                 true), // clear volume directory after use
    m_msgWrite(a_msgWrite),
    m_autoCorrect(a_autoCorrect),
    m_removeMissingOnMedia(a_removeMissingOnMedia),
    m_checkStat(a_checkStat)
{
    log_FUNC_m(fsc_VolumeCheck);
    // m_sameOfsBlockEnd point to the end of the current block
    // at start point to first element
    m_sameOfsBlockEnd = m_sameOfsBlockBeg;
    log_DBG_m(dbg_DETAIL,  "Buff : m_sameOfsBlockEnd =" << hex << m_sameOfsBlockEnd
                      <<  " m_buffEnd_p =" << hex << m_buffEnd_p << dec);
    // prepare first m_currentBlockOffset and its sub block range
    if (m_sameOfsBlockEnd == NULL) {
        GetNextOfsSubBlock();
    }
}

Here is the call graph for this function:

fsc_VolumeCheck::~fsc_VolumeCheck (  )  [virtual]

Definition at line 105 of file fsc_VolumeCheck.cpp.

References GetNextOfsSubBlock(), log_FUNC_m, m_sameOfsBlockEnd, and NULL.

                                  {
    log_FUNC_m(~fsc_VolumeCheck);
    while (m_sameOfsBlockEnd != NULL
          && !uncaught_exception()) {
        GetNextOfsSubBlock();
    }
}

Here is the call graph for this function:


Member Function Documentation

void fsc_VolumeCheck::Check ( df_SplitInfo a_splitInfo  )  [private]

Definition at line 126 of file fsc_VolumeCheck.cpp.

References ivd_MediaChkStat_t::addToFSC, df_SplitInfo::blockOffset, ivd_MediaChkStat_t::checked, fsc_nsElement::CheckLastGen(), ivd_MediaChkStat_t::correctedNSC, fsc_medVolData_t::dataSize, fsc_medVolData_t::dataType, df_SplitInfo::dataType, dbg_DETAIL, DisplayMessage(), fsc_medVolData_t::fileID, df_SplitInfo::fileID, df_SplitInfo::fileType, FindMVD(), fsc_nsCreateElementObj(), fsc_nsRemoveElementObj(), g_updateNSC, ie_FSC_NONSCELEMENTOBJ, ift_DIR, fsc_DataLMgr::Insert(), fsc_Split::IsZeroSizeSplit(), ivd_ATTR_d, ivd_DATA_d, df_SplitInfo::lastSplit, log_DBG_m, log_FUNC_m, log_MSG_m, log_WARNING, m_autoCorrect, m_checkStat, m_dataLMgr, df_SplitInfo::mediaKey, df_SplitInfo::medVolNum, ivd_MediaChkStat_t::mismatch, fsc_medVolData_t::MismatchDump(), ivd_MediaChkStat_t::missingInFSC, mvds_LASTGENERATION, mvds_NONSC, ivd_MediaChkStat_t::noNSC, NULL, fsc_DataLMgr::Remove(), fsc_medVolData_t::splitOffset, df_SplitInfo::splitOffset, fsc_medVolData_t::splitSize, df_SplitInfo::splitSize, and fsc_medVolData_t::status.

Referenced by ProcSplitInfo().

                                                     {
    log_FUNC_m(Check);
    // find particular fsc_medVolData_t
    UInt32_t fieldStatus = fmm_OK;

    m_checkStat.checked++;

    bool zeroSplit;

    {
        fsc_Split fscSplit(a_splitInfo);
        zeroSplit = fscSplit.IsZeroSizeSplit();
    }

    fsc_medVolData_t *mvd = FindMVD(a_splitInfo);
    if (mvd == NULL) {
        // not in FSC
        string statusTxt;

        if (zeroSplit) {
            return;
        }
        if (m_autoCorrect) {
            m_dataLMgr.Insert(a_splitInfo);
            statusTxt = "    Missing in FSC. [CORRECTED] ";
            m_checkStat.addToFSC++;
        }
        else {
            statusTxt = "    Missing in FSC.";
            m_checkStat.missingInFSC++;
        }
        DisplayMessage(a_splitInfo,
                       statusTxt);
        return;
    }

    if (zeroSplit) {
        string statusTxt;
        if (m_autoCorrect) {
            m_dataLMgr.Remove(a_splitInfo.fileID,
                              a_splitInfo.mediaKey,
                              a_splitInfo.medVolNum,
                              a_splitInfo.blockOffset);
            statusTxt = "    Found entry for zero split size in FSC. [CORRECTED] ";
            DisplayMessage(a_splitInfo,
                           statusTxt);
        }
        else {
            ostringstream msg;
            msg << "Found entry for zero size split in FSC. "
                << "Run check with autocorrect option to correct this entry.";
            log_MSG_m(log_WARNING, 0,  msg.str());
        }
    }

    log_DBG_m(dbg_DETAIL,  mvd->MismatchDump());

    bool fscUpdateNeeded(false);

    if (   a_splitInfo.lastSplit  //
        && ((a_splitInfo.dataType & ivd_DATA_d) == ivd_DATA_d)  // not only header migratted
        && a_splitInfo.fileType != ift_DIR // not a directory
        && mvd->dataSize != (UInt64_t)a_splitInfo.splitOffset + a_splitInfo.splitSize) {
        fieldStatus |= fmm_MIGSIZE;
        fscUpdateNeeded = true;
    }
    if (mvd->dataType != a_splitInfo.dataType) {
        fieldStatus |= fmm_MIGFLAGS;
        fscUpdateNeeded = true;
    }
    if (mvd->splitOffset != (UInt64_t)a_splitInfo.splitOffset) {
        fieldStatus |= fmm_SPLITOFFSET;
    }
    if (mvd->splitSize != (UInt64_t)a_splitInfo.splitSize
        && a_splitInfo.dataType != ivd_ATTR_d  // not only header migratted
        && a_splitInfo.fileType != ift_DIR) {
        fieldStatus |= fmm_SPLITSIZE;
        // dataType mismatch
    }

    if (m_autoCorrect && fscUpdateNeeded) {
        m_dataLMgr.Insert(a_splitInfo);
    }

//    auto_ptr<fsc_nsElement> nsElement = NULL;
    fsc_nsElement *nsElement = NULL;

    string ret;

    if (g_updateNSC) {
        if (mvd->status & mvds_NONSC) {
            if (m_autoCorrect) {
                m_dataLMgr.Insert(a_splitInfo);
                ret = "    No NSC. [CORRECTED]";
                m_checkStat.correctedNSC++;
            }
            else {
                m_checkStat.noNSC++;
                ret = "    No NSC.";
            }
        }
        else if (mvd->status & mvds_LASTGENERATION) {
            nsElement = fsc_nsCreateElementObj(a_splitInfo.fileID,
                                               a_splitInfo.fileType == ift_DIR);
            if (nsElement != NULL) {
                nsElement->CheckLastGen(ret, a_splitInfo, m_autoCorrect, fieldStatus);
            }
            else {
                throw ivd_InternalError(ie_FSC_NONSCELEMENTOBJ, "", true);
            }
        }
//        CheckNSC(a_splitInfo, mvd->status, fieldStatus);
    }

    if (fieldStatus || !ret.empty()) {
        m_checkStat.mismatch++;
        DisplayMessage(*mvd,
                       nsElement,
                       a_splitInfo,
                       ret,
                       fieldStatus);
    }

    if (nsElement != NULL) {
        fsc_nsRemoveElementObj(nsElement);
    }
    mvd->fileID = 0; // set to 0 to mark already handled
}

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_VolumeCheck::DisplayMessage ( df_SplitInfo a_splitInfo,
string &  a_status 
) [private]

Definition at line 348 of file fsc_VolumeCheck.cpp.

References df_SplitInfo::blockOffset, cmn_GetMigFlags(), cmn_Num2Str(), df_SplitInfo::continueSplit, df_SplitInfo::dataType, ui_MsgWriter::DisplayMessage(), df_SplitInfo::fileID, df_SplitInfo::fileName, df_SplitInfo::fileSize, df_SplitInfo::fileType, df_SplitInfo::lastSplit, m_msgWrite, df_SplitInfo::mediaKey, df_SplitInfo::medVolNum, df_SplitInfo::migrationID, df_SplitInfo::oldFileName, df_SplitInfo::oldOwnerID, df_SplitInfo::ownerID, df_SplitInfo::splitOffset, and df_SplitInfo::splitSize.

                                                                    {
    string friDataSizeStr;
    if (a_splitInfo.lastSplit) {
        friDataSizeStr = cmn_Num2Str(a_splitInfo.splitOffset + a_splitInfo.splitSize);
    }
    else {
        friDataSizeStr = "n/a";
    }

    string splitFlag;
    if (a_splitInfo.continueSplit) {
        splitFlag = 'C';
    }
    if (a_splitInfo.lastSplit) {
        splitFlag += 'L';
    }

    ostringstream sstr;
    sstr << a_splitInfo.fileID << " "
        << a_splitInfo.migrationID << " "
        << a_splitInfo.fileName << endl
        << a_status << endl
        << "    DUMP:                     FRI" << endl;

    sstr << "    MigID        " << setw(16) << a_splitInfo.migrationID << endl;

    sstr << "    MediaKey     " << setw(16) << a_splitInfo.mediaKey << endl;

    sstr << "    MedVolNum    " << setw(16) << a_splitInfo.medVolNum << endl;

    sstr << "    MedVolOffset " << setw(16) << a_splitInfo.blockOffset << endl;

    sstr << "    FileType     " << setw(16) << a_splitInfo.fileType << endl;

    sstr << "    FileSize     " << setw(16) << a_splitInfo.fileSize << endl;

    sstr << "    MigSize      " << setw(16) << friDataSizeStr << endl;

    sstr << "    MigFlags     " << setw(16) << cmn_GetMigFlags((int)a_splitInfo.dataType) << endl;

    sstr << "    SplitFlags   " << setw(16) << splitFlag << endl;

    sstr << "    SplitOffset  " << setw(16) << a_splitInfo.splitOffset << endl;

    sstr << "    SplitSize    " << setw(16) << a_splitInfo.splitSize << endl;

    sstr << "    FileName     " << a_splitInfo.fileName << endl;

    sstr << "    OldFileName  " << setw(16) << a_splitInfo.oldFileName << endl;
    sstr << "    OwnerID      " << setw(16) << a_splitInfo.ownerID << endl;
    sstr << "    OldOwnerID   " << setw(16) << a_splitInfo.oldOwnerID << endl;

    m_msgWrite.DisplayMessage(sstr.str().c_str());
}

Here is the call graph for this function:

void fsc_VolumeCheck::DisplayMessage ( fsc_medVolData_t a_mvd,
fsc_nsElement a_nsElement_p,
df_SplitInfo a_splitInfo,
string &  a_status,
UInt32_t  a_fieldStatus 
) [private]

Definition at line 256 of file fsc_VolumeCheck.cpp.

References df_SplitInfo::blockOffset, fsc_medVolData_t::blockOffset, cmn_GetMigFlags(), cmn_Num2Str(), df_SplitInfo::continueSplit, fsc_medVolData_t::dataSize, df_SplitInfo::dataType, fsc_medVolData_t::dataType, ui_MsgWriter::DisplayMessage(), df_SplitInfo::fileID, df_SplitInfo::fileName, df_SplitInfo::fileSize, df_SplitInfo::fileType, fmm_FILENAME, fmm_FILESIZE, fmm_MEDVOLOFFSET, fmm_MIGFLAGS, fmm_MIGID, fmm_MIGSIZE, fmm_SPLITFLAGS, fmm_SPLITOFFSET, fmm_SPLITSIZE, fsc_MissmatchTxt_d, fsc_nsElement::GetStandAttrPtr(), df_SplitInfo::lastSplit, m_autoCorrect, m_msgWrite, df_SplitInfo::mediaKey, df_SplitInfo::medVolNum, fsc_medVolData_t::migrationID, df_SplitInfo::migrationID, ntoh(), NULL, df_SplitInfo::oldFileName, df_SplitInfo::oldOwnerID, df_SplitInfo::ownerID, df_StandardAttr_t::size, fsc_medVolData_t::splitOffset, df_SplitInfo::splitOffset, fsc_medVolData_t::splitSize, df_SplitInfo::splitSize, and fsc_medVolData_t::status.

Referenced by Check().

                                                                        {
    string friDataSizeStr;
    if (a_splitInfo.lastSplit) {
        friDataSizeStr = cmn_Num2Str(a_splitInfo.splitOffset + a_splitInfo.splitSize);
    }
    else {
        friDataSizeStr = "n/a";
    }

    string fscFileSizeStr = "n/a";
    if (a_nsElement_p != NULL) {
        df_StandardAttr_t* standAttr_p = a_nsElement_p->GetStandAttrPtr();
        if (standAttr_p != NULL) {
            fscFileSizeStr = cmn_Num2Str(ntoh(standAttr_p->size));
        }
    }


    string splitFlag;
    if (a_splitInfo.continueSplit) {
        splitFlag = 'C';
    }
    if (a_splitInfo.lastSplit) {
        splitFlag += 'L';
    }

    ostringstream sstr;
    sstr << a_splitInfo.fileID << " "
        << a_splitInfo.migrationID << " "
        << a_splitInfo.fileName << endl
        << a_status << endl
        << "    DUMP:                     FSC             FRI Notes" << endl;

    sstr << "    MigID        " << setw(16) << a_mvd.migrationID
            << setw(16) << a_splitInfo.migrationID
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_MIGID);

    sstr << "    MediaKey     " << setw(16) << "n/a" << setw(16) << a_splitInfo.mediaKey << endl;

    sstr << "    MedVolNum    " << setw(16) << "n/a" << setw(16) << a_splitInfo.medVolNum << endl;

    sstr << "    MedVolOffset " << setw(16) << a_mvd.blockOffset << setw(16) << a_splitInfo.blockOffset
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_MEDVOLOFFSET);

    sstr << "    FileType     " << setw(16) << "n/a" << setw(16) << a_splitInfo.fileType << endl;

    sstr << "    FileSize     " << setw(16) << fscFileSizeStr << setw(16) << a_splitInfo.fileSize
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_FILESIZE);

    sstr << "    MigSize      " << setw(16) << a_mvd.dataSize << setw(16) << friDataSizeStr
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_MIGSIZE);

    sstr << "    MigFlags     " << setw(16) << cmn_GetMigFlags((int)a_mvd.dataType)
            << setw(16) << cmn_GetMigFlags((int)a_splitInfo.dataType);
    if (a_fieldStatus & fmm_MIGFLAGS) {
        if (m_autoCorrect) {
            sstr << " MISMATCH [CORRECTED]\n";
        }
        else {
            sstr << " MISMATCH\n";
        }
    }
    else {
        sstr << "\n";
    }

    sstr << "    SplitFlags   " << setw(16) << "n/a" << setw(16) << splitFlag
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_SPLITFLAGS);

    sstr << "    SplitOffset  " << setw(16) << a_mvd.splitOffset << setw(16) << a_splitInfo.splitOffset
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_SPLITOFFSET);

    sstr << "    SplitSize    " << setw(16) << a_mvd.splitSize << setw(16) << a_splitInfo.splitSize
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_SPLITSIZE);

    sstr << "    FileName     " << setw(16) << "n/a" << " " << a_splitInfo.fileName
            << fsc_MissmatchTxt_d(a_fieldStatus & fmm_FILENAME);


    sstr << "    OldFileName  " << setw(16) << "n/a" << setw(16) << a_splitInfo.oldFileName << endl;
    sstr << "    OwnerID      " << setw(16) << "n/a" << setw(16) << a_splitInfo.ownerID << endl;
    sstr << "    OldOwnerID   " << setw(16) << "n/a" << setw(16) << a_splitInfo.oldOwnerID << endl;
    sstr << "    Status       " << setw(16) << a_mvd.status << setw(16) << "n/a" << endl;

    m_msgWrite.DisplayMessage(sstr.str().c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

fsc_medVolData_t * fsc_VolumeCheck::FindMVD ( df_SplitInfo a_splitInfo  )  [private]

Definition at line 405 of file fsc_VolumeCheck.cpp.

References df_SplitInfo::blockOffset, dbg_DETAIL, df_SplitInfo::fileID, GetNextOfsSubBlock(), log_DBG_m, log_FUNC_m, m_buffEnd_p, m_currentBlockOffset, m_sameOfsBlockBeg, m_sameOfsBlockEnd, df_SplitInfo::migrationID, and NULL.

Referenced by Check().

                                                                    {
    log_FUNC_m(FindMVD);
    log_DBG_m(dbg_DETAIL,  "m_sameOfsBlockEnd = " << m_sameOfsBlockEnd);
    if (m_sameOfsBlockEnd == NULL) {
        return NULL; // FSC has no more data for this volume
    }
    while (m_currentBlockOffset < a_splitInfo.blockOffset) {
        log_DBG_m(dbg_DETAIL,  "GetNextOfsSubBlock");
        GetNextOfsSubBlock();
        log_DBG_m(dbg_DETAIL,  "Next Buff : m_sameOfsBlockEnd =" << hex << m_sameOfsBlockEnd
                            << " m_buffEnd_p =" << hex << m_buffEnd_p << dec);
        if (m_sameOfsBlockEnd == NULL) {
            log_DBG_m(dbg_DETAIL,  "Block is empty");
           return NULL;
        }
    }
    if (m_currentBlockOffset != a_splitInfo.blockOffset) {
       log_DBG_m(dbg_DETAIL,  "m_currentBlockOffset != splitInfo.blockOffset "
                             <<  m_currentBlockOffset << " != " << a_splitInfo.blockOffset);
        return NULL; // split is not from same block,
    }
    log_DBG_m(dbg_DETAIL,  "Search in MedVolOfs block"
                        << "SI.fileID =" << a_splitInfo.fileID
                        << " SI.migID =" << a_splitInfo.migrationID);
    for (fsc_medVolData_t* iter = m_sameOfsBlockBeg;
         iter != m_sameOfsBlockEnd;
         ++iter) {
         log_DBG_m(dbg_DETAIL,  "fileID =" << iter->fileID
                             << " migID =" << iter->migrationID);
         if (//   mvd.blockOffset == a_splitInfo.blockOffset
             // &&
                iter->fileID      == a_splitInfo.fileID
             && iter->migrationID == a_splitInfo.migrationID) {
             return iter;
         }
    }
    return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_VolumeCheck::GetNextOfsSubBlock (  )  [private]

Definition at line 445 of file fsc_VolumeCheck.cpp.

References fsc_medVolData_t::blockOffset, dbg_DETAIL, fsc_MedVolReader::GetNextBuff(), log_DBG_m, log_FUNC_m, m_buffEnd_p, m_currentBlockOffset, m_medVolRead, m_sameOfsBlockBeg, m_sameOfsBlockEnd, NULL, and RestDataHandle().

Referenced by FindMVD(), fsc_VolumeCheck(), and ~fsc_VolumeCheck().

                                         {
    log_FUNC_m(GetNextOfsSubBlock);
    RestDataHandle();
    if (m_sameOfsBlockEnd == m_buffEnd_p) { // get new buffer
        // m_sameOfsBlockEnd point to first element when new buffer got
       m_medVolRead.GetNextBuff(m_sameOfsBlockEnd, m_buffEnd_p);
       log_DBG_m(dbg_DETAIL,  "Next Buff : m_sameOfsBlockEnd =" << hex << m_sameOfsBlockEnd
                          <<  " m_buffEnd_p =" << hex << m_buffEnd_p << dec);
       if (m_sameOfsBlockEnd == NULL) {
           return; // no more data
       }
    }
    m_sameOfsBlockBeg    = m_sameOfsBlockEnd;
    m_currentBlockOffset = m_sameOfsBlockBeg->blockOffset;
    log_DBG_m(dbg_DETAIL,  "m_currentBlockOffset =" << m_currentBlockOffset);
    while (++m_sameOfsBlockEnd != m_buffEnd_p
           && m_sameOfsBlockEnd->blockOffset == m_currentBlockOffset) {
        // empty
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_VolumeCheck::ProcSplitInfo ( df_SplitInfo a_splitInfo  )  [private, virtual]

when one split info is parsed then call ProcSplitInfo()

Reimplemented from df_SplitInfoUnpacker.

Definition at line 114 of file fsc_VolumeCheck.cpp.

References Check(), log_FUNC_m, and NULL.

                                                             {
    log_FUNC_m(ProcSplitInfo);

    if (a_splitInfo != NULL) {
        Check(*a_splitInfo);
    }
    else {
  //      cout << "End of stream." << endl;
    }
}

Here is the call graph for this function:

void fsc_VolumeCheck::RestDataHandle (  )  [private]

Definition at line 467 of file fsc_VolumeCheck.cpp.

References ui_MsgWriter::DisplayMessage(), df_SplitInfoUnpacker::GetMediumKey(), df_SplitInfoUnpacker::GetMedVolNum(), log_FUNC_m, m_checkStat, m_dataLMgr, m_msgWrite, m_removeMissingOnMedia, m_sameOfsBlockBeg, m_sameOfsBlockEnd, ivd_MediaChkStat_t::missingOnMedia, and fsc_DataLMgr::Remove().

Referenced by GetNextOfsSubBlock().

                                     {
    log_FUNC_m(RestDataHandle);

    for (fsc_medVolData_t* iter = m_sameOfsBlockBeg;
         iter != m_sameOfsBlockEnd;
         ++iter) {
        // handled splits has fileID = 0
        if (iter->fileID != 0) {
            // split in FSC but not on volume
            // this entries has no its presence on volume

            ostringstream sstr;
            sstr << (*iter).fileID << " "
                << (*iter).migrationID << " " << endl
                << "    Missing on volume.";

            if (m_removeMissingOnMedia) {
                if (m_dataLMgr.Remove(iter->fileID,
                                  GetMediumKey(),
                                  GetMedVolNum(),
                                  iter->blockOffset)) {
                    sstr << " [REMOVED from FSC]";
                }
                else {
                    sstr << " [REMOVE FAILED]";
                    m_checkStat.missingOnMedia++;
                }
            }
            else {
                m_checkStat.missingOnMedia++;
            }

            sstr << endl
                << "    DUMP:      FSC"
                << (*iter).MismatchDump();
            m_msgWrite.DisplayMessage(sstr.str());
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Macro to add class name member s_className.

Reimplemented from df_SplitInfoUnpacker.

Definition at line 109 of file fsc_VolumeCheck.h.

if set then add missing split to FSC

Definition at line 99 of file fsc_VolumeCheck.h.

Referenced by Check(), and DisplayMessage().

This is set by MedVolume class NOTE: fsc_VolumeCheck modify buffer to know which rec was already handled fileID is modified field and is set to 0 after use.

Definition at line 83 of file fsc_VolumeCheck.h.

Referenced by FindMVD(), fsc_VolumeCheck(), and GetNextOfsSubBlock().

statistic collection recod

Definition at line 105 of file fsc_VolumeCheck.h.

Referenced by Check(), and RestDataHandle().

from which block offset are data in m_volData_v

Definition at line 86 of file fsc_VolumeCheck.h.

Referenced by FindMVD(), and GetNextOfsSubBlock().

to update FSC in case of split missing

Definition at line 70 of file fsc_VolumeCheck.h.

Referenced by Check(), and RestDataHandle().

media volume reader, reads prepared file by FSC NOTE: this class modify buffer got from m_medVolRead

Definition at line 93 of file fsc_VolumeCheck.h.

Referenced by GetNextOfsSubBlock().

writes mismatch to client output

Definition at line 96 of file fsc_VolumeCheck.h.

Referenced by DisplayMessage(), and RestDataHandle().

check output file name is constructed with partitionName

Definition at line 89 of file fsc_VolumeCheck.h.

if set then remove splits from FSC that missing on media

Definition at line 102 of file fsc_VolumeCheck.h.

Referenced by RestDataHandle().

first entry of current offset

Definition at line 74 of file fsc_VolumeCheck.h.

Referenced by FindMVD(), fsc_VolumeCheck(), GetNextOfsSubBlock(), and RestDataHandle().

next offset

Definition at line 76 of file fsc_VolumeCheck.h.

Referenced by FindMVD(), fsc_VolumeCheck(), GetNextOfsSubBlock(), RestDataHandle(), and ~fsc_VolumeCheck().


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