Commit ab418303 authored by David COME's avatar David COME
Browse files

MountSession renamed in DataTransferSession

parent 6ad8bfad
...@@ -46,7 +46,7 @@ namespace legacymsg { ...@@ -46,7 +46,7 @@ namespace legacymsg {
* |<--------------------------------| | * |<--------------------------------| |
* | | | * | | |
* | fork | | * | fork | |
* |----------->MountSession | | * |----------->DataTransferSession | |
* | | | | * | | | |
* | | assignDrive | | * | | assignDrive | |
* | |-------------->| | * | |-------------->| |
......
...@@ -425,7 +425,7 @@ void castor::tape::rmc::RmcDaemon::forkChildProcess() throw() { ...@@ -425,7 +425,7 @@ void castor::tape::rmc::RmcDaemon::forkChildProcess() throw() {
// Else if this is the parent process // Else if this is the parent process
} else if(0 < childPid) { } else if(0 < childPid) {
m_driveCatalogue.forkedMountSession(unitName, childPid); m_driveCatalogue.forkedDataTransferSession(unitName, childPid);
// Else this is the child process // Else this is the child process
} else { } else {
...@@ -433,11 +433,11 @@ void castor::tape::rmc::RmcDaemon::forkChildProcess() throw() { ...@@ -433,11 +433,11 @@ void castor::tape::rmc::RmcDaemon::forkChildProcess() throw() {
// file-descriptors owned by the event handlers // file-descriptors owned by the event handlers
m_reactor.clear(); m_reactor.clear();
runMountSession(unitName); runDataTransferSession(unitName);
// The runMountSession() should call exit() and should therefore never // The runDataTransferSession() should call exit() and should therefore never
// return // return
m_log(LOG_ERR, "runMountSession() returned unexpectedly"); m_log(LOG_ERR, "runDataTransferSession() returned unexpectedly");
} }
*/ */
} }
...@@ -101,7 +101,7 @@ tapegateway::GatewayMessage * ...@@ -101,7 +101,7 @@ tapegateway::GatewayMessage *
std::stringstream mess; std::stringstream mess;
if (ret->mountTransactionId() != m_request.volReqId) { if (ret->mountTransactionId() != m_request.volReqId) {
mess << "In castor::tape::server::clientInterface::requestResponseSession, " mess << "In castor::tape::server::clientInterface::requestResponseSession, "
"expected a information about mountSessionId=" << m_request.volReqId "expected a information about DataTransferSessionId=" << m_request.volReqId
<< " and received: " << ret->mountTransactionId(); << " and received: " << ret->mountTransactionId();
} else { } else {
mess << "In castor::tape::server::clientInterface::requestResponseSession, " mess << "In castor::tape::server::clientInterface::requestResponseSession, "
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "ClientProxy.hpp" #include "ClientProxy.hpp"
#include "../threading/Threading.hpp" #include "../threading/Threading.hpp"
#include "castor/log/StringLogger.hpp" #include "castor/log/StringLogger.hpp"
#include "castor/tape/tapeserver/daemon/MountSession.hpp" #include "castor/tape/tapeserver/daemon/DataTransferSession.hpp"
#include "../system/Wrapper.hpp" #include "../system/Wrapper.hpp"
#include "Ctape.h" #include "Ctape.h"
#include "castor/tape/tapegateway/Volume.hpp" #include "castor/tape/tapegateway/Volume.hpp"
......
...@@ -23,7 +23,7 @@ add_library(castorTapeServerDaemon ...@@ -23,7 +23,7 @@ add_library(castorTapeServerDaemon
MigrationMemoryManager.cpp MigrationMemoryManager.cpp
MigrationReportPacker.cpp MigrationReportPacker.cpp
MigrationTaskInjector.cpp MigrationTaskInjector.cpp
MountSession.cpp DataTransferSession.cpp
RecallMemoryManager.cpp RecallMemoryManager.cpp
RecallTaskInjector.cpp RecallTaskInjector.cpp
RecallReportPacker.cpp RecallReportPacker.cpp
......
/****************************************************************************** /******************************************************************************
* MountSession.cpp * DataTransferSession.cpp
* *
* This file is part of the Castor project. * This file is part of the Castor project.
* See http://castor.web.cern.ch/castor * See http://castor.web.cern.ch/castor
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <memory> #include <memory>
#include "castor/tape/tapeserver/daemon/MountSession.hpp" #include "castor/tape/tapeserver/daemon/DataTransferSession.hpp"
#include "castor/log/LogContext.hpp" #include "castor/log/LogContext.hpp"
#include "castor/tape/tapeserver/exception/Exception.hpp" #include "castor/tape/tapeserver/exception/Exception.hpp"
#include "castor/tape/tapeserver/client/ClientProxy.hpp" #include "castor/tape/tapeserver/client/ClientProxy.hpp"
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
#include "castor/tape/tapeserver/daemon/GlobalStatusReporter.hpp" #include "castor/tape/tapeserver/daemon/GlobalStatusReporter.hpp"
#include "castor/tape/tapeserver/daemon/TapeReadSingleThread.hpp" #include "castor/tape/tapeserver/daemon/TapeReadSingleThread.hpp"
#include "castor/tape/tapeserver/daemon/CapabilityUtils.hpp" #include "castor/tape/tapeserver/daemon/CapabilityUtils.hpp"
#include "castor/tape/tapeserver/daemon/MountSession.hpp" #include "castor/tape/tapeserver/daemon/DataTransferSession.hpp"
using namespace castor::tape; using namespace castor::tape;
using namespace castor::log; using namespace castor::log;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//Constructor //Constructor
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::MountSession::MountSession( castor::tape::tapeserver::daemon::DataTransferSession::DataTransferSession(
int argc, int argc,
char ** argv, char ** argv,
const std::string & hostname, const std::string & hostname,
...@@ -77,7 +77,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession( ...@@ -77,7 +77,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession(
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//MountSession::execute //DataTransferSession::execute
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** /**
* Function's synopsis * Function's synopsis
...@@ -87,7 +87,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession( ...@@ -87,7 +87,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession(
* 2b) Log The result * 2b) Log The result
* Then branch to the right execution * Then branch to the right execution
*/ */
int castor::tape::tapeserver::daemon::MountSession::execute() int castor::tape::tapeserver::daemon::DataTransferSession::execute()
{ {
// 1) Prepare the logging environment // 1) Prepare the logging environment
LogContext lc(m_logger); LogContext lc(m_logger);
...@@ -171,9 +171,9 @@ int castor::tape::tapeserver::daemon::MountSession::execute() ...@@ -171,9 +171,9 @@ int castor::tape::tapeserver::daemon::MountSession::execute()
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//MountSession::executeRead //DataTransferSession::executeRead
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int castor::tape::tapeserver::daemon::MountSession::executeRead(LogContext & lc) { int castor::tape::tapeserver::daemon::DataTransferSession::executeRead(LogContext & lc) {
// We are ready to start the session. We need to create the whole machinery // We are ready to start the session. We need to create the whole machinery
// in order to get the task injector ready to check if we actually have a // in order to get the task injector ready to check if we actually have a
// file to recall. // file to recall.
...@@ -250,9 +250,9 @@ int castor::tape::tapeserver::daemon::MountSession::executeRead(LogContext & lc) ...@@ -250,9 +250,9 @@ int castor::tape::tapeserver::daemon::MountSession::executeRead(LogContext & lc)
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//MountSession::executeWrite //DataTransferSession::executeWrite
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int castor::tape::tapeserver::daemon::MountSession::executeWrite(LogContext & lc) { int castor::tape::tapeserver::daemon::DataTransferSession::executeWrite(LogContext & lc) {
// We are ready to start the session. We need to create the whole machinery // We are ready to start the session. We need to create the whole machinery
// in order to get the task injector ready to check if we actually have a // in order to get the task injector ready to check if we actually have a
// file to migrate. // file to migrate.
...@@ -341,9 +341,9 @@ int castor::tape::tapeserver::daemon::MountSession::executeWrite(LogContext & lc ...@@ -341,9 +341,9 @@ int castor::tape::tapeserver::daemon::MountSession::executeWrite(LogContext & lc
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//MountSession::executeDump //DataTransferSession::executeDump
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc) { void castor::tape::tapeserver::daemon::DataTransferSession::executeDump(LogContext & lc) {
// We are ready to start the session. In case of read there is no interest in // We are ready to start the session. In case of read there is no interest in
// creating the machinery before getting the tape mounted, so do it now. // creating the machinery before getting the tape mounted, so do it now.
// 1) Get hold of the drive and check it. // 1) Get hold of the drive and check it.
...@@ -351,7 +351,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc ...@@ -351,7 +351,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//MountSession::findDrive //DataTransferSession::findDrive
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/* /*
* Function synopsis : * Function synopsis :
...@@ -367,7 +367,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc ...@@ -367,7 +367,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc
* @return the drive if found, NULL otherwise * @return the drive if found, NULL otherwise
*/ */
castor::tape::drives::DriveInterface * castor::tape::drives::DriveInterface *
castor::tape::tapeserver::daemon::MountSession::findDrive(const utils::DriveConfig castor::tape::tapeserver::daemon::DataTransferSession::findDrive(const utils::DriveConfig
&driveConfig, LogContext& lc) { &driveConfig, LogContext& lc) {
// Find the drive in the system's SCSI devices // Find the drive in the system's SCSI devices
castor::tape::SCSI::DeviceVector dv(m_sysWrapper); castor::tape::SCSI::DeviceVector dv(m_sysWrapper);
...@@ -471,16 +471,16 @@ castor::tape::tapeserver::daemon::MountSession::findDrive(const utils::DriveConf ...@@ -471,16 +471,16 @@ castor::tape::tapeserver::daemon::MountSession::findDrive(const utils::DriveConf
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//MountSession::ctx //DataTransferSession::ctx
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
zmq::context_t& castor::tape::tapeserver::daemon::MountSession::ctx(){ zmq::context_t& castor::tape::tapeserver::daemon::DataTransferSession::ctx(){
static zmq::context_t m_ctx; static zmq::context_t m_ctx;
return m_ctx; return m_ctx;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//destructor //destructor
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::MountSession::~MountSession(){ castor::tape::tapeserver::daemon::DataTransferSession::~DataTransferSession(){
ctx().close(); ctx().close();
} }
/****************************************************************************** /******************************************************************************
* MountSession.hpp * DataTransferSession.hpp
* *
* This file is part of the Castor project. * This file is part of the Castor project.
* See http://castor.web.cern.ch/castor * See http://castor.web.cern.ch/castor
...@@ -52,7 +52,7 @@ namespace daemon { ...@@ -52,7 +52,7 @@ namespace daemon {
* by the master process. It will drive a separate process. Only the sub * by the master process. It will drive a separate process. Only the sub
* process interface is not included here to allow testability. * process interface is not included here to allow testability.
*/ */
class MountSession { class DataTransferSession {
public: public:
/** Subclass holding all the contents from castor.conf file. The pre- /** Subclass holding all the contents from castor.conf file. The pre-
* extraction of the contents by the caller instead of direct getconfent * extraction of the contents by the caller instead of direct getconfent
...@@ -98,7 +98,7 @@ namespace daemon { ...@@ -98,7 +98,7 @@ namespace daemon {
uint32_t tapeserverdDiskThreads; uint32_t tapeserverdDiskThreads;
}; };
/** Constructor */ /** Constructor */
MountSession( DataTransferSession(
int argc, int argc,
char ** argv, char ** argv,
const std::string & hostname, const std::string & hostname,
...@@ -122,7 +122,7 @@ namespace daemon { ...@@ -122,7 +122,7 @@ namespace daemon {
*/ */
static zmq::context_t& ctx(); static zmq::context_t& ctx();
~MountSession(); ~DataTransferSession();
private: private:
legacymsg::RtcpJobRqstMsgBody m_request; legacymsg::RtcpJobRqstMsgBody m_request;
castor::log::Logger & m_logger; castor::log::Logger & m_logger;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "castor/tape/tapeserver/daemon/CapabilityUtilsDummy.hpp" #include "castor/tape/tapeserver/daemon/CapabilityUtilsDummy.hpp"
#include "../threading/Threading.hpp" #include "../threading/Threading.hpp"
#include "castor/log/StringLogger.hpp" #include "castor/log/StringLogger.hpp"
#include "MountSession.hpp" #include "DataTransferSession.hpp"
#include "../system/Wrapper.hpp" #include "../system/Wrapper.hpp"
#include "Ctape.h" #include "Ctape.h"
#include "castor/tape/tapegateway/Volume.hpp" #include "castor/tape/tapegateway/Volume.hpp"
...@@ -71,7 +71,7 @@ private: ...@@ -71,7 +71,7 @@ private:
TEST(tapeServer, MountSessionGooddayRecall) { TEST(tapeServer, DataTransferSessionGooddayRecall) {
// TpcpClients only supports 32 bits session number // TpcpClients only supports 32 bits session number
// This number has to be less than 2^31 as in addition there is a mix // This number has to be less than 2^31 as in addition there is a mix
// of signed and unsigned numbers // of signed and unsigned numbers
...@@ -157,7 +157,7 @@ TEST(tapeServer, MountSessionGooddayRecall) { ...@@ -157,7 +157,7 @@ TEST(tapeServer, MountSessionGooddayRecall) {
driveConfig.densities.push_back("5000GC"); driveConfig.densities.push_back("5000GC");
driveConfig.librarySlot = "manual"; driveConfig.librarySlot = "manual";
driveConfig.devType = "T10000"; driveConfig.devType = "T10000";
MountSession::CastorConf castorConf; DataTransferSession::CastorConf castorConf;
castorConf.rtcopydBufsz = 1024*1024; // 1 MB memory buffers castorConf.rtcopydBufsz = 1024*1024; // 1 MB memory buffers
castorConf.rtcopydNbBufs = 10; castorConf.rtcopydNbBufs = 10;
castorConf.tapebridgeBulkRequestRecallMaxBytes = UINT64_C(100)*1000*1000*1000; castorConf.tapebridgeBulkRequestRecallMaxBytes = UINT64_C(100)*1000*1000*1000;
...@@ -177,7 +177,7 @@ TEST(tapeServer, MountSessionGooddayRecall) { ...@@ -177,7 +177,7 @@ TEST(tapeServer, MountSessionGooddayRecall) {
argv_ctn_str.find_first_of("\0",pos); argv_ctn_str.find_first_of("\0",pos);
} }
} }
MountSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys, DataTransferSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys,
driveConfig, rmc, initialProcess, capUtils, castorConf); driveConfig, rmc, initialProcess, capUtils, castorConf);
sess.execute(); sess.execute();
simRun.wait(); simRun.wait();
...@@ -187,7 +187,7 @@ TEST(tapeServer, MountSessionGooddayRecall) { ...@@ -187,7 +187,7 @@ TEST(tapeServer, MountSessionGooddayRecall) {
} }
TEST(tapeServer, MountSessionNoSuchDrive) { TEST(tapeServer, DataTransferSessionNoSuchDrive) {
// TpcpClients only supports 32 bits session number // TpcpClients only supports 32 bits session number
// This number has to be less than 2^31 as in addition there is a mix // This number has to be less than 2^31 as in addition there is a mix
// of signed and unsigned numbers // of signed and unsigned numbers
...@@ -226,7 +226,7 @@ TEST(tapeServer, MountSessionNoSuchDrive) { ...@@ -226,7 +226,7 @@ TEST(tapeServer, MountSessionNoSuchDrive) {
driveConfig.densities.push_back("5000GC"); driveConfig.densities.push_back("5000GC");
driveConfig.librarySlot = "manual"; driveConfig.librarySlot = "manual";
driveConfig.devType = "T10000"; driveConfig.devType = "T10000";
MountSession::CastorConf castorConf; DataTransferSession::CastorConf castorConf;
castorConf.rtcopydBufsz = 1024; castorConf.rtcopydBufsz = 1024;
castorConf.rtcopydNbBufs = 10; castorConf.rtcopydNbBufs = 10;
castor::legacymsg::VmgrProxyDummy vmgr; castor::legacymsg::VmgrProxyDummy vmgr;
...@@ -245,7 +245,7 @@ TEST(tapeServer, MountSessionNoSuchDrive) { ...@@ -245,7 +245,7 @@ TEST(tapeServer, MountSessionNoSuchDrive) {
argv_ctn_str.find_first_of("\0",pos); argv_ctn_str.find_first_of("\0",pos);
} }
} }
MountSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys, DataTransferSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys,
driveConfig, rmc, initialProcess, capUtils, castorConf); driveConfig, rmc, initialProcess, capUtils, castorConf);
sess.execute(); sess.execute();
simRun.wait(); simRun.wait();
...@@ -310,7 +310,7 @@ struct expectedResult { ...@@ -310,7 +310,7 @@ struct expectedResult {
uint32_t checksum; uint32_t checksum;
}; };
TEST(tapeServer, MountSessionGooddayMigration) { TEST(tapeServer, DataTransferSessionGooddayMigration) {
// TpcpClients only supports 32 bits session number // TpcpClients only supports 32 bits session number
// This number has to be less than 2^31 as in addition there is a mix // This number has to be less than 2^31 as in addition there is a mix
// of signed and unsigned numbers // of signed and unsigned numbers
...@@ -378,7 +378,7 @@ TEST(tapeServer, MountSessionGooddayMigration) { ...@@ -378,7 +378,7 @@ TEST(tapeServer, MountSessionGooddayMigration) {
driveConfig.densities.push_back("5000GC"); driveConfig.densities.push_back("5000GC");
driveConfig.librarySlot = "manual"; driveConfig.librarySlot = "manual";
driveConfig.devType = "T10000"; driveConfig.devType = "T10000";
MountSession::CastorConf castorConf; DataTransferSession::CastorConf castorConf;
castorConf.rtcopydBufsz = 1024*1024; // 1 MB memory buffers castorConf.rtcopydBufsz = 1024*1024; // 1 MB memory buffers
castorConf.rtcopydNbBufs = 10; castorConf.rtcopydNbBufs = 10;
castorConf.tapebridgeBulkRequestMigrationMaxBytes = UINT64_C(100)*1000*1000*1000; castorConf.tapebridgeBulkRequestMigrationMaxBytes = UINT64_C(100)*1000*1000*1000;
...@@ -400,7 +400,7 @@ TEST(tapeServer, MountSessionGooddayMigration) { ...@@ -400,7 +400,7 @@ TEST(tapeServer, MountSessionGooddayMigration) {
argv_ctn_str.find_first_of("\0",pos); argv_ctn_str.find_first_of("\0",pos);
} }
} }
MountSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys, DataTransferSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys,
driveConfig, rmc, initialProcess, capUtils, castorConf); driveConfig, rmc, initialProcess, capUtils, castorConf);
sess.execute(); sess.execute();
simRun.wait(); simRun.wait();
......
...@@ -483,9 +483,9 @@ void castor::tape::tapeserver::daemon::DriveCatalogueEntry::receivedLabelJob( ...@@ -483,9 +483,9 @@ void castor::tape::tapeserver::daemon::DriveCatalogueEntry::receivedLabelJob(
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// forkedMountSession // forkedDataTransferSession
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void castor::tape::tapeserver::daemon::DriveCatalogueEntry::forkedMountSession( void castor::tape::tapeserver::daemon::DriveCatalogueEntry::forkedDataTransferSession(
const pid_t sessionPid) { const pid_t sessionPid) {
std::ostringstream task; std::ostringstream task;
task << "handle fork of mount session for tape drive " << m_config.unitName; task << "handle fork of mount session for tape drive " << m_config.unitName;
......
...@@ -328,7 +328,7 @@ public: ...@@ -328,7 +328,7 @@ public:
* @param sessionPid The process ID of the child process responsible for * @param sessionPid The process ID of the child process responsible for
* running the mount session. * running the mount session.
*/ */
void forkedMountSession(const pid_t sessionPid); void forkedDataTransferSession(const pid_t sessionPid);
/** /**
* Moves the state of the tape drive to DRIVE_STATE_RUNNING. * Moves the state of the tape drive to DRIVE_STATE_RUNNING.
......
...@@ -193,7 +193,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveCatalogueTest, completeFSTN) { ...@@ -193,7 +193,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveCatalogueTest, completeFSTN) {
// Fork the mount session // Fork the mount session
const pid_t sessionPid = 1234; const pid_t sessionPid = 1234;
ASSERT_NO_THROW(unit->forkedMountSession(sessionPid)); ASSERT_NO_THROW(unit->forkedDataTransferSession(sessionPid));
ASSERT_EQ(castor::tape::tapeserver::daemon::DriveCatalogueSession::SESSION_STATE_RUNNING, unit->getSessionState()); ASSERT_EQ(castor::tape::tapeserver::daemon::DriveCatalogueSession::SESSION_STATE_RUNNING, unit->getSessionState());
ASSERT_EQ(sessionPid, unit->getSessionPid()); ASSERT_EQ(sessionPid, unit->getSessionPid());
......
...@@ -202,7 +202,7 @@ private: ...@@ -202,7 +202,7 @@ private:
* IT is computed by subtracting 1 to fSeg of the first file to migrate we * IT is computed by subtracting 1 to fSeg of the first file to migrate we
* receive. That part is done by the * receive. That part is done by the
* MigrationTaskInjector.::synchronousInjection. Thus, we compute it into * MigrationTaskInjector.::synchronousInjection. Thus, we compute it into
* that function and retrieve/set it within MountSession executeWrite * that function and retrieve/set it within DataTransferSession executeWrite
* after we make sure synchronousInjection returned true. To do so, we * after we make sure synchronousInjection returned true. To do so, we
* need to store it * need to store it
*/ */
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "castor/tape/tapeserver/daemon/Constants.hpp" #include "castor/tape/tapeserver/daemon/Constants.hpp"
#include "castor/tape/tapeserver/daemon/LabelCmdAcceptHandler.hpp" #include "castor/tape/tapeserver/daemon/LabelCmdAcceptHandler.hpp"
#include "castor/tape/tapeserver/daemon/LabelSession.hpp" #include "castor/tape/tapeserver/daemon/LabelSession.hpp"
#include "castor/tape/tapeserver/daemon/MountSession.hpp" #include "castor/tape/tapeserver/daemon/DataTransferSession.hpp"
#include "castor/tape/tapeserver/daemon/TapeDaemon.hpp" #include "castor/tape/tapeserver/daemon/TapeDaemon.hpp"
#include "castor/tape/tapeserver/daemon/TapeMessageHandler.hpp" #include "castor/tape/tapeserver/daemon/TapeMessageHandler.hpp"
#include "castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp" #include "castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp"
...@@ -443,7 +443,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon:: ...@@ -443,7 +443,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::tape::tapeserver::daemon::TapeDaemon::mainEventLoop() { void castor::tape::tapeserver::daemon::TapeDaemon::mainEventLoop() {
while(handleEvents()) { while(handleEvents()) {
forkMountSessions(); forkDataTransferSessions();
forkLabelSessions(); forkLabelSessions();
} }
} }
...@@ -745,23 +745,23 @@ void castor::tape::tapeserver::daemon::TapeDaemon::postProcessReapedLabelSession ...@@ -745,23 +745,23 @@ void castor::tape::tapeserver::daemon::TapeDaemon::postProcessReapedLabelSession
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// forkMountSessions // forkDataTransferSessions
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::tape::tapeserver::daemon::TapeDaemon::forkMountSessions() throw() { void castor::tape::tapeserver::daemon::TapeDaemon::forkDataTransferSessions() throw() {
const std::list<std::string> unitNames = m_driveCatalogue.getUnitNamesWaitingForTransferFork(); const std::list<std::string> unitNames = m_driveCatalogue.getUnitNamesWaitingForTransferFork();
for(std::list<std::string>::const_iterator itor = unitNames.begin(); for(std::list<std::string>::const_iterator itor = unitNames.begin();
itor != unitNames.end(); itor++) { itor != unitNames.end(); itor++) {
const std::string unitName = *itor; const std::string unitName = *itor;
DriveCatalogueEntry *drive = m_driveCatalogue.findDrive(unitName); DriveCatalogueEntry *drive = m_driveCatalogue.findDrive(unitName);
forkMountSession(drive); forkDataTransferSession(drive);
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// forkMountSession // forkDataTransferSession
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::tape::tapeserver::daemon::TapeDaemon::forkMountSession( void castor::tape::tapeserver::daemon::TapeDaemon::forkDataTransferSession(
DriveCatalogueEntry *drive) throw() { DriveCatalogueEntry *drive) throw() {
const utils::DriveConfig &driveConfig = drive->getConfig(); const utils::DriveConfig &driveConfig = drive->getConfig();
...@@ -783,7 +783,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::forkMountSession( ...@@ -783,7 +783,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::forkMountSession(
// Else if this is the parent process // Else if this is the parent process
} else if(0 < forkRc) { } else if(0 < forkRc) {
drive->forkedMountSession(forkRc);