Commit 2547718e authored by David COME's avatar David COME
Browse files

Mixed commit to fix several points which have been broken by the previous merge

parent fbc8927d
......@@ -45,7 +45,7 @@ namespace daemon {
MigrationTaskInjector::MigrationTaskInjector(MigrationMemoryManager & mm,
DiskThreadPoolInterface<DiskReadTaskInterface> & diskReader,
TapeSingleThreadInterface<TapeWriteTask> & tapeWriter,client::ClientInterface& client,
TapeSingleThreadInterface<TapeWriteTaskInterface> & tapeWriter,client::ClientInterface& client,
castor::log::LogContext lc):
m_thread(*this),m_memManager(mm),m_tapeWriter(tapeWriter),
m_diskReader(diskReader),m_client(client),m_lc(lc)
......
......@@ -48,7 +48,7 @@ public:
MigrationTaskInjector(MigrationMemoryManager & mm,
DiskThreadPoolInterface<DiskReadTaskInterface> & diskReader,
TapeSingleThreadInterface<TapeWriteTask> & tapeWriter,client::ClientInterface& client,
TapeSingleThreadInterface<TapeWriteTaskInterface> & tapeWriter,client::ClientInterface& client,
castor::log::LogContext lc);
......@@ -143,7 +143,7 @@ private:
MigrationMemoryManager & m_memManager;
TapeSingleThreadInterface<TapeWriteTask>& m_tapeWriter;
TapeSingleThreadInterface<TapeWriteTaskInterface>& m_tapeWriter;
DiskThreadPoolInterface<DiskReadTaskInterface>& m_diskReader;
client::ClientInterface& m_client;
......
......@@ -197,7 +197,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeWrite(LogContext & l
if (!drive.get()) return;
// Once we got hold of the drive, we can run the session
{
MemoryManager mm(m_castorConf.rtcopydNbBufs,
MigrationMemoryManager mm(m_castorConf.rtcopydNbBufs,
m_castorConf.rtcopydBufsz,lc);
MigrationReportPacker mrp(m_clientProxy,
lc);
......@@ -288,7 +288,7 @@ castor::tape::tapeserver::daemon::MountSession::findDrive(LogContext& lc) {
driveInfo = dv.findBySymlink(configLine->devFilename);
} catch (castor::tape::SCSI::DeviceVector::NotFound & e) {
// We could not find this drive in the system's SCSI devices
LogContexdoist::ScopedParam sp08(lc, Param("density", m_volInfo.density));
LogContext::ScopedParam sp08(lc, Param("density", m_volInfo.density));
LogContext::ScopedParam sp09(lc, Param("devFilename", configLine->devFilename));
lc.log(LOG_ERR, "Drive not found on this path");
......@@ -305,12 +305,12 @@ castor::tape::tapeserver::daemon::MountSession::findDrive(LogContext& lc) {
return NULL;
} catch (castor::exception::Exception & e) {
// We could not find this drive in the system's SCSI devices
LogContext::Set the task injector ready to check if we actually have a
//Set the task injector ready to check if we actually have a
// file to recall.
// findDrive does not throw exceptions (it catches them to log errors)
// A NULL pointer is returned on failure
std::auto_ptr<castor::tape::drives::DriveInterface> drive(findDrive(lc));
if(!drive.get()) return;
if(!drive.get()) return NULL;
// We can now startcopedParam sp08(lc, Param("density", m_volInfo.density));
LogContext::ScopedParam sp09(lc, Param("devFilename", configLine->devFilename));
LogContext::ScopedParam sp10(lc, Param("errorMessage", e.getMessageValue()));
......
......@@ -38,15 +38,15 @@ namespace tape {
namespace tapeserver {
namespace daemon {
class TapeWriteSingleThread : public TapeSingleThreadInterface<TapeWriteTask> {
class TapeWriteSingleThread : public TapeSingleThreadInterface<TapeWriteTaskInterface> {
public:
TapeWriteSingleThread(castor::tape::drives::DriveInterface & drive,
const std::string & vid,
castor::log::LogContext & lc, MigrationReportPacker & repPacker,
castor::log::LogContext & lc, MigrationReportPacker & repPacker,
uint64_t filesBeforeFlush, uint64_t bytesBeforeFlush):
TapeSingleThreadInterface<TapeWriteTaskInterface>(drive, vid, lc),
m_filesBeforeFlush(filesBeforeFlush),m_bytesBeforeFlush(bytesBeforeFlush),
m_drive(drive), m_reportPacker(repPacker), m_lastFseq(0), m_compress(0) {}
m_drive(drive), m_reportPacker(repPacker), m_lastFseq(0), m_compress(0) {}
private:
/**
......@@ -97,8 +97,8 @@ private:
{
// First we have to initialise the tape read session
std::auto_ptr<castor::tape::tapeFile::WriteSession> rs(openWriteSession());
uint64_t bytes=0;
uint64_t bytes=0;
uint64_t files=0;
std::auto_ptr<TapeWriteTaskInterface> task ;
while(1) {
......@@ -130,9 +130,9 @@ private:
}
}
const uint64_t m_filesBeforeFlush;
const uint64_t m_filesBeforeFlush;
const uint64_t m_bytesBeforeFlush;
castor::tape::drives::DriveInterface& m_drive;
MigrationReportPacker & m_reportPacker;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment