Commit 6d1d97c4 authored by Julien Leduc's avatar Julien Leduc
Browse files

00060-CASTOR-5279-Logical-Block-Protection-support-in-the-.patch...

00060-CASTOR-5279-Logical-Block-Protection-support-in-the-.patch 52627f63d074f301b43e753bf00eca430bdb5d0f TO REVIEW
parent 11318df4
......@@ -137,7 +137,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeStatRequestMsgBody) {
TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeLabelRqstMsgBody) {
using namespace castor::legacymsg;
char buf[47]; // Expect message (header + body) to occupy exactly 45 bytes
char buf[47]; // Expect message (header + body) to occupy exactly 47 bytes
TapeLabelRqstMsgBody srcMsgBody;
// Marshal entire message (header + body)
......
......@@ -39,7 +39,8 @@ castor::tape::tapeserver::daemon::DataTransferConfig::DataTransferConfig()
bulkRequestRecallMaxFiles(0),
maxBytesBeforeFlush(0),
maxFilesBeforeFlush(0),
nbDiskThreads(0) {
nbDiskThreads(0),
useLbp(false) {
}
//------------------------------------------------------------------------------
......@@ -82,6 +83,14 @@ castor::tape::tapeserver::daemon::DataTransferConfig
"TapeServer", "RemoteFileProtocol", "RFIO", log);
config.xrootPrivateKey = castorConf.getConfEntString(
"TapeServer", "XrootPrivateKey", "/etc/castor/xrd_tape_key.pem", log);
const std::string useLBP = castorConf.getConfEntString(
"TapeServer", "UseLogicalBlockProtection", "no", log);
if (!strcasecmp(useLBP.c_str(), "yes") || !strcmp(useLBP.c_str(), "1")) {
config.useLbp = true;
} else {
config.useLbp = false;
}
return config;
}
......@@ -114,6 +114,12 @@ struct DataTransferConfig {
*/
std::string xrootPrivateKey;
/**
* The boolean variable describing to use on not to use Logical
* Block Protection.
*/
bool useLbp;
/**
* Constructor that sets all integer member-variables to 0 and all string
* member-variables to the empty string.
......
......@@ -151,7 +151,7 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
tsr.gotReadMountDetailsFromClient();
TapeReadSingleThread trst(*drive, m_mc, tsr, m_volInfo,
m_castorConf.bulkRequestRecallMaxFiles,m_capUtils,rwd,lc,rrp);
m_castorConf.bulkRequestRecallMaxFiles,m_capUtils,rwd,lc,rrp,m_castorConf.useLbp);
DiskWriteThreadPool dwtp(m_castorConf.nbDiskThreads,
rrp,
......@@ -244,7 +244,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
mrp,
m_capUtils,
m_castorConf.maxFilesBeforeFlush,
m_castorConf.maxBytesBeforeFlush);
m_castorConf.maxBytesBeforeFlush,
m_castorConf.useLbp);
DiskReadThreadPool drtp(m_castorConf.nbDiskThreads,
m_castorConf.bulkRequestMigrationMaxFiles,
m_castorConf.bulkRequestMigrationMaxBytes,
......
......@@ -201,7 +201,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
castor::tape::tapeserver::daemon::VolumeInfo volInfo;
volInfo.vid="V12345";
castor::tape::tapeFile::WriteSession ws(*mockSys.fake.m_pathToDrive["/dev/nst0"],
volInfo , 0, true);
volInfo , 0, true, false);
// Write a few files on the virtual tape and modify the archive name space
// so that it is in sync
......@@ -363,7 +363,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
castor::tape::tapeserver::daemon::VolumeInfo volInfo;
volInfo.vid="V12345";
castor::tape::tapeFile::WriteSession ws(*mockSys.fake.m_pathToDrive["/dev/nst0"],
volInfo , 0, true);
volInfo , 0, true, false);
// Write a few files on the virtual tape and modify the archive name space
// so that it is in sync
......@@ -517,7 +517,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
castor::tape::tapeserver::daemon::VolumeInfo volInfo;
volInfo.vid="V12345";
castor::tape::tapeFile::WriteSession ws(*mockSys.fake.m_pathToDrive["/dev/nst0"],
volInfo , 0, true);
volInfo , 0, true, false);
// Write a few files on the virtual tape and modify the archive name space
// so that it is in sync
......
......@@ -34,12 +34,14 @@ castor::tape::tapeserver::daemon::TapeReadSingleThread::TapeReadSingleThread(
castor::server::ProcessCap& capUtils,
RecallWatchDog& watchdog,
castor::log::LogContext& lc,
RecallReportPacker &rrp) :
RecallReportPacker &rrp,
const bool useLbp) :
TapeSingleThreadInterface<TapeReadTask>(drive, mc, initialProcess, volInfo,
capUtils, lc),
m_maxFilesRequest(maxFilesRequest),
m_watchdog(watchdog),
m_rrp(rrp){}
m_rrp(rrp),
m_useLbp(useLbp) {}
//------------------------------------------------------------------------------
//TapeCleaning::~TapeCleaning()
......@@ -150,7 +152,7 @@ std::unique_ptr<castor::tape::tapeFile::ReadSession>
castor::tape::tapeserver::daemon::TapeReadSingleThread::openReadSession() {
try{
std::unique_ptr<castor::tape::tapeFile::ReadSession> rs(
new castor::tape::tapeFile::ReadSession(m_drive,m_volInfo));
new castor::tape::tapeFile::ReadSession(m_drive,m_volInfo, m_useLbp));
m_logContext.log(LOG_DEBUG, "Created tapeFile::ReadSession with success");
return rs;
......@@ -226,7 +228,25 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::run() {
{
castor::log::ScopedParamContainer scoped(m_logContext);
scoped.add("positionTime", m_stats.positionTime);
m_logContext.log(LOG_INFO, "Tape read session session successfully started");
scoped.add("useLbp", m_useLbp);
scoped.add("detectedLbp", rs->isTapeWithLbp());
if (rs->isTapeWithLbp() && !m_useLbp) {
m_logContext.log(LOG_WARNING, "Tapserver started without LBP support"
" but the tape with LBP label mounted");
}
switch(m_drive.getLbpToUse()) {
case drive::lbpToUse::crc32cReadOnly:
m_logContext.log(LOG_INFO, "Tape read session session with LBP "
"crc32c in ReadOnly mode successfully started");
break;
case drive::lbpToUse::disabled:
m_logContext.log(LOG_INFO, "Tape read session session without LBP "
"successfully started");
break;
default:
m_logContext.log(LOG_ERR, "Tape read session session with "
"unsupported LBP started");
}
}
m_initialProcess.tapeMountedForRead();
m_stats.waitReportingTime += timer.secs(castor::utils::Timer::resetCounter);
......
......@@ -65,7 +65,8 @@ public:
castor::server::ProcessCap &capUtils,
RecallWatchDog& watchdog,
castor::log::LogContext & lc,
RecallReportPacker &rrp);
RecallReportPacker &rrp,
const bool useLbp);
/**
* Set the task injector. Has to be done that way (and not in the constructor)
......@@ -138,6 +139,12 @@ private:
/// Reference to the RecallReportPacker, used to update tape/drive state during recall
RecallReportPacker & m_rrp;
/**
* The boolean variable describing to use on not to use Logical
* Block Protection.
*/
const bool m_useLbp;
/// Helper virtual function to access the watchdog from parent class
virtual void countTapeLogError(const std::string & error) {
m_watchdog.addToErrorCount(error);
......
......@@ -36,7 +36,8 @@ castor::tape::tapeserver::drive::DriveInterface & drive,
castor::log::LogContext & lc,
MigrationReportPacker & repPacker,
castor::server::ProcessCap &capUtils,
uint64_t filesBeforeFlush, uint64_t bytesBeforeFlush):
uint64_t filesBeforeFlush, uint64_t bytesBeforeFlush,
const bool useLbp):
TapeSingleThreadInterface<TapeWriteTask>(drive, mc, tsr, volInfo,capUtils, lc),
m_filesBeforeFlush(filesBeforeFlush),
m_bytesBeforeFlush(bytesBeforeFlush),
......@@ -44,6 +45,7 @@ castor::tape::tapeserver::drive::DriveInterface & drive,
m_reportPacker(repPacker),
m_lastFseq(-1),
m_compress(true),
m_useLbp(useLbp),
m_watchdog(mwd){}
//------------------------------------------------------------------------------
//setlastFseq
......@@ -66,12 +68,14 @@ castor::tape::tapeserver::daemon::TapeWriteSingleThread::openWriteSession() {
ScopedParam sp[]={
ScopedParam(m_logContext, Param("TPVID",m_vid)),
ScopedParam(m_logContext, Param("lastFseq", m_lastFseq)),
ScopedParam(m_logContext, Param("compression", m_compress))
ScopedParam(m_logContext, Param("compression", m_compress)),
ScopedParam(m_logContext, Param("useLbp", m_useLbp))
};
tape::utils::suppresUnusedVariable(sp);
try {
writeSession.reset(
new castor::tape::tapeFile::WriteSession(m_drive,m_volInfo,m_lastFseq,m_compress)
new castor::tape::tapeFile::WriteSession(m_drive, m_volInfo, m_lastFseq,
m_compress, m_useLbp)
);
m_logContext.log(LOG_INFO, "Tape Write session session successfully started");
}
......@@ -196,9 +200,30 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() {
{
castor::log::ScopedParamContainer scoped(m_logContext);
scoped.add("positionTime", m_stats.positionTime);
m_logContext.log(LOG_INFO, "Write session initialised, tape VID checked and drive positioned for writing");
scoped.add("useLbp", m_useLbp);
scoped.add("detectedLbp", writeSession->isTapeWithLbp());
if (!writeSession->isTapeWithLbp() && m_useLbp) {
m_logContext.log(LOG_INFO, "Tapserver started with LBP support but "
"the tape without LBP label mounted");
}
switch(m_drive.getLbpToUse()) {
case drive::lbpToUse::crc32cReadWrite:
m_logContext.log(LOG_INFO, "Write session initialised with LBP"
" crc32c in ReadWrite mode, tape VID checked and drive positioned"
" for writing");
break;
case drive::lbpToUse::disabled:
m_logContext.log(LOG_INFO, "Write session initialised without LBP"
", tape VID checked and drive positioned for writing");
break;
default:
m_logContext.log(LOG_ERR, "Write session initialised with "
"unsupported LBP method, tape VID checked and drive positioned"
" for writing");
}
}
m_initialProcess.tapeMountedForWrite();
uint64_t bytes=0;
uint64_t files=0;
......
......@@ -68,8 +68,8 @@ public:
castor::log::LogContext & lc,
MigrationReportPacker & repPacker,
castor::server::ProcessCap &capUtils,
uint64_t filesBeforeFlush, uint64_t bytesBeforeFlush);
uint64_t filesBeforeFlush, uint64_t bytesBeforeFlush, const bool useLbp);
/**
*
* @param lastFseq
......@@ -244,6 +244,12 @@ private:
*/
const bool m_compress;
/**
* The boolean variable describing to use on not to use Logical
* Block Protection.
*/
const bool m_useLbp;
/**
* Reference to the watchdog, used in run()
*/
......
......@@ -214,6 +214,15 @@ namespace drive {
*/
virtual bool isTapeBlank();
/**
* Function that returns internal status of the logical block protection
* method to be used for read/write from/to the tape drive.
* @return The lbp to be used for read/write from/to the tape drive.
*/
virtual lbpToUse getLbpToUse() {
return m_lbpToUse;
}
/**
* getTapeError: get SENSE buffer from patched version of the driver
* or fall back to other information and report tape statuses.
......
......@@ -218,6 +218,7 @@ namespace drive {
virtual bool isAtBOT() = 0;
virtual bool isAtEOD() = 0;
virtual bool isTapeBlank() = 0;
virtual lbpToUse getLbpToUse() = 0;
virtual bool hasTapeInPlace() = 0;
/**
......
......@@ -32,7 +32,8 @@ namespace {
castor::tape::tapeserver::drive::FakeDrive::FakeDrive(uint64_t capacity,
FailureMoment failureMoment, bool failToMount) throw():
m_currentPosition(0), m_tapeCapacity(capacity), m_beginOfCompressStats(0),
m_failureMoment(failureMoment), m_tapeOverflow(false), m_failToMount(failToMount)
m_failureMoment(failureMoment), m_tapeOverflow(false),
m_failToMount(failToMount), m_lbpToUse(lbpToUse::disabled)
{
m_tape.reserve(max_fake_drive_record_length);
}
......@@ -107,10 +108,10 @@ castor::tape::tapeserver::drive::driveStatus castor::tape::tapeserver::drive::Fa
throw castor::exception::Exception("FakeDrive::getDriveStatus Not implemented");
}
void castor::tape::tapeserver::drive::FakeDrive::enableCRC32CLogicalBlockProtectionReadOnly() {
throw castor::exception::Exception("FakeDrive::enableCRC32CLogicalBlockProtectionReadOnly Not implemented");
m_lbpToUse = lbpToUse::crc32cReadOnly;
}
void castor::tape::tapeserver::drive::FakeDrive::enableCRC32CLogicalBlockProtectionReadWrite() {
throw castor::exception::Exception("FakeDrive::enableCRC32CLogicalBlockProtectionReadWrite Not implemented");
m_lbpToUse = lbpToUse::crc32cReadWrite;
}
void castor::tape::tapeserver::drive::FakeDrive::enableReedSolomonLogicalBlockProtectionReadOnly() {
throw castor::exception::Exception("FakeDrive::enableReedSolomonLogicalBlockProtectionReadOnly Not implemented");
......@@ -119,7 +120,7 @@ void castor::tape::tapeserver::drive::FakeDrive::enableReedSolomonLogicalBlockP
throw castor::exception::Exception("FakeDrive::enableCReedSolomonLogicalBlockProtectionReadWrite Not implemented");
}
void castor::tape::tapeserver::drive::FakeDrive::disableLogicalBlockProtection() {
throw castor::exception::Exception("FakeDrive::disableLogicalBlockProtection Not implemented");
m_lbpToUse = lbpToUse::disabled;
}
castor::tape::tapeserver::drive::LBPInfo castor::tape::tapeserver::drive::FakeDrive::getLBPInfo() {
throw castor::exception::Exception("FakeDrive::dgetLBPInfo Not implemented");
......@@ -276,6 +277,11 @@ bool castor::tape::tapeserver::drive::FakeDrive::isTapeBlank() {
return m_tape.empty();
}
castor::tape::tapeserver::drive::lbpToUse
castor::tape::tapeserver::drive::FakeDrive::getLbpToUse() {
return m_lbpToUse;
}
bool castor::tape::tapeserver::drive::FakeDrive::hasTapeInPlace() {
return true;
}
......@@ -49,6 +49,7 @@ namespace drive {
const enum FailureMoment m_failureMoment;
bool m_tapeOverflow;
bool m_failToMount;
lbpToUse m_lbpToUse;
public:
std::string contentToString() throw();
......@@ -98,6 +99,7 @@ namespace drive {
virtual bool isAtBOT() ;
virtual bool isAtEOD() ;
virtual bool isTapeBlank();
virtual lbpToUse getLbpToUse();
virtual bool hasTapeInPlace();
};
......
......@@ -50,9 +50,11 @@ namespace castor {
}
ReadSession::ReadSession(tapeserver::drive::DriveInterface & drive,
tapeserver::daemon::VolumeInfo volInfo) :
m_drive(drive), m_vid(volInfo.vid), m_corrupted(false), m_locked(false),
m_fseq(1), m_currentFilePart(Header),m_volInfo(volInfo) {
tapeserver::daemon::VolumeInfo volInfo,
const bool useLbp) :
m_drive(drive), m_vid(volInfo.vid), m_useLbp(useLbp), m_corrupted(false),
m_locked(false), m_fseq(1), m_currentFilePart(Header),m_volInfo(volInfo),
m_detectedLbp(false) {
if(!m_vid.compare("")) {
throw castor::exception::InvalidArgument();
......@@ -63,7 +65,27 @@ namespace castor {
ex.getMessage() << "[ReadSession::ReadSession()] - Tape is blank, cannot proceed with constructing the ReadSession";
throw ex;
}
// this readBlock only for mhvtl workaround
m_drive.rewind();
m_drive.disableLogicalBlockProtection();
VOL1withCrc vol1WithCrc;
const ssize_t res = m_drive.readBlock((void * )&vol1WithCrc,
sizeof(vol1WithCrc));
if (res >= (ssize_t)(sizeof(VOL1withCrc) - sizeof(VOL1))) {
switch(vol1WithCrc.getLBPMethod()) {
case SCSI::logicBlockProtectionMethod::CRC32C:
m_detectedLbp = true;
if (m_useLbp) {
m_drive.enableCRC32CLogicalBlockProtectionReadOnly();
}
break;
default:
m_detectedLbp = false;
}
}
// from this point the right LBP mode should be set or not set
m_drive.rewind();
VOL1 vol1;
m_drive.readExactBlock((void * )&vol1, sizeof(vol1), "[ReadSession::ReadSession()] - Reading VOL1");
......@@ -344,9 +366,11 @@ namespace castor {
WriteSession::WriteSession(tapeserver::drive::DriveInterface & drive,
const tapeserver::daemon::VolumeInfo& volInfo,
const uint32_t last_fSeq, const bool compression)
const uint32_t last_fSeq, const bool compression,
const bool useLbp)
: m_drive(drive), m_vid(volInfo.vid), m_compressionEnabled(compression),
m_corrupted(false), m_locked(false),m_volInfo(volInfo) {
m_useLbp(useLbp), m_corrupted(false), m_locked(false),
m_volInfo(volInfo), m_detectedLbp(false) {
if(!m_vid.compare("")) {
throw castor::exception::InvalidArgument();
......@@ -358,6 +382,32 @@ namespace castor {
throw ex;
}
// this readBlock only for mhvtl workaround
m_drive.rewind();
m_drive.disableLogicalBlockProtection();
VOL1withCrc vol1WithCrc;
const ssize_t res = m_drive.readBlock((void * )&vol1WithCrc,
sizeof(vol1WithCrc));
if (res >= (ssize_t)(sizeof(VOL1withCrc) - sizeof(VOL1))) {
switch(vol1WithCrc.getLBPMethod()) {
case SCSI::logicBlockProtectionMethod::CRC32C:
m_detectedLbp = true;
if (m_useLbp) {
m_drive.enableCRC32CLogicalBlockProtectionReadWrite();
} else {
castor::exception::Exception ex;
ex.getMessage() << "[WriteSession::WriteSession()] - Tape is "
"labeled with crc32c logical block protection but tapserverd "
"started without LBP support";
throw ex;
}
break;
default:
m_detectedLbp = false;
}
}
// from this point the right LBP mode should be set or not set
m_drive.rewind();
VOL1 vol1;
m_drive.readExactBlock((void * )&vol1, sizeof(vol1), "[WriteSession::WriteSession()] - Reading VOL1");
......
......@@ -188,9 +188,11 @@ namespace castor {
* volId value. Throws an exception in case of mismatch.
* @param drive: drive object to which we bind the session
* @param vid: volume name of the tape we would like to read from
* @param useLbp: castor.conf option to use or not to use LBP in tapeserverd
*/
ReadSession(tapeserver::drive::DriveInterface & drive,
tapeserver::daemon::VolumeInfo volInfo);
tapeserver::daemon::VolumeInfo volInfo,
const bool useLbp);
/**
* DriveGeneric object referencing the drive used during this read session
......@@ -202,6 +204,12 @@ namespace castor {
*/
const std::string m_vid;
/**
* The boolean variable describing to use on not to use Logical
* Block Protection.
*/
const bool m_useLbp;
void setCorrupted() throw() {
m_corrupted = true;
}
......@@ -210,6 +218,10 @@ namespace castor {
return m_corrupted;
}
bool isTapeWithLbp() throw() {
return m_detectedLbp;
}
void lock() {
if(m_locked) {
throw SessionAlreadyInUse();
......@@ -269,6 +281,11 @@ namespace castor {
PartOfFile m_currentFilePart;
const tapeserver::daemon::VolumeInfo m_volInfo;
/**
* The boolean variable indicates that the tape has VOL1 with enabled LBP
*/
bool m_detectedLbp;
};
class ReadFile{
......@@ -363,10 +380,12 @@ namespace castor {
* @param volId: volume name of the tape we would like to write to
* @param last_fseq: fseq of the last active (undeleted) file on tape
* @param compression: set this to true in case the drive has compression enabled (x000GC)
* @param useLbp: castor.conf option to use or not to use LBP in tapeserverd
*/
WriteSession(tapeserver::drive::DriveInterface & drive,
const tapeserver::daemon::VolumeInfo& volInfo,
const uint32_t last_fseq, const bool compression) ;
const uint32_t last_fseq, const bool compression,
const bool useLbp) ;
/**
* DriveGeneric object referencing the drive used during this write session
......@@ -383,6 +402,12 @@ namespace castor {
*/
bool m_compressionEnabled;
/**
* The boolean variable describing to use on not to use Logical
* Block Protection.
*/
const bool m_useLbp;
std::string getSiteName() throw() {
return m_siteName;
}
......@@ -399,6 +424,10 @@ namespace castor {
return m_corrupted;
}
bool isTapeWithLbp() throw() {
return m_detectedLbp;
}
void lock() {
if(m_locked) {
throw SessionAlreadyInUse();
......@@ -489,6 +518,11 @@ namespace castor {
bool m_locked;
const tapeserver::daemon::VolumeInfo m_volInfo;
/**
* The boolean variable indicates that the tape has VOL1 with enabled LBP
*/
bool m_detectedLbp;
};
class WriteFile {
......
......@@ -87,7 +87,7 @@ namespace unitTests {
TEST_F(castorTapeFileTest, throwsWhenReadingAnEmptyTape) {
castor::tape::tapeFile::ReadSession *rs;
rs = new castor::tape::tapeFile::ReadSession(d, volInfo);
rs = new castor::tape::tapeFile::ReadSession(d, volInfo, false);
ASSERT_NE((long int)rs, 0);
fileToRecall.positioningMethod = cta::PositioningMethod::ByBlock;
ASSERT_THROW({castor::tape::tapeFile::ReadFile rf1(rs, fileToRecall);}, castor::exception::Exception); //cannot read a file on an empty tape
......@@ -109,7 +109,7 @@ namespace unitTests {
}
delete ws;
castor::tape::tapeFile::ReadSession *rs;
rs = new castor::tape::tapeFile::ReadSession(d, volInfo);
rs = new castor::tape::tapeFile::ReadSession(d, volInfo, false);
{
fileToRecall.positioningMethod = cta::PositioningMethod::ByBlock;
castor::tape::tapeFile::ReadFile rf1(rs, fileToRecall);
......@@ -120,7 +120,7 @@ namespace unitTests {
TEST_F(castorTapeFileTest, throwsWhenWritingAnEmptyFileOrSessionCorrupted) {
castor::tape::tapeFile::WriteSession *ws;
ws = new castor::tape::tapeFile::WriteSession(d, volInfo, 0, true);
ws = new castor::tape::tapeFile::WriteSession(d, volInfo, 0, true, false);
ASSERT_EQ(ws->isCorrupted(), false);
{
std::unique_ptr<castor::tape::tapeFile::WriteFile> wf;
......@@ -137,7 +137,7 @@ namespace unitTests {
TEST_F(castorTapeFileTest, throwsWhenClosingTwice) {
const std::string testString("Hello World!");
castor::tape::tapeFile::WriteSession *ws;
ws = new castor::tape::tapeFile::WriteSession(d, volInfo, 0, true);
ws = new castor::tape::tapeFile::WriteSession(d, volInfo, 0, true, false);
{
std::unique_ptr<castor::tape::tapeFile::WriteFile> wf;
ASSERT_NO_THROW(wf.reset(new castor::tape::tapeFile::WriteFile(ws, fileToMigrate, block_size)));
......@@ -151,7 +151,7 @@ namespace unitTests {
TEST_F(castorTapeFileTest, throwsWhenWrongBlockSizeOrEOF) {
const std::string testString("Hello World!");
castor::tape::tapeFile::WriteSession *ws;
ws = new castor::tape::tapeFile::WriteSession(d, volInfo, 0, true);
ws = new castor::tape::tapeFile::WriteSession(d, volInfo, 0, true, false);
{
std::unique_ptr<castor::tape::tapeFile::WriteFile> wf;
ASSERT_NO_THROW(wf.reset(new castor::tape::tapeFile::WriteFile(ws, fileToMigrate, block_size)));
......@@ -161,7 +161,7 @@ namespace unitTests {
delete ws;
castor::tape::tapeFile::ReadSession *rs;
rs = new castor::tape::tapeFile::ReadSession(d, volInfo);
rs = new castor::tape::tapeFile::ReadSession(d, volInfo, false);
{
fileToRecall.positioningMethod = cta::PositioningMethod::ByBlock;
castor::tape::tapeFile::ReadFile rf(rs, fileToRecall);
......@@ -177,7 +177,7 @@ namespace unitTests {