Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
2547718e
Commit
2547718e
authored
Apr 28, 2014
by
David COME
Browse files
Mixed commit to fix several points which have been broken by the previous merge
parent
fbc8927d
Changes
4
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/MigrationTaskInjector.cpp
View file @
2547718e
...
...
@@ -45,7 +45,7 @@ namespace daemon {
MigrationTaskInjector
::
MigrationTaskInjector
(
MigrationMemoryManager
&
mm
,
DiskThreadPoolInterface
<
DiskReadTaskInterface
>
&
diskReader
,
TapeSingleThreadInterface
<
TapeWriteTask
>
&
tapeWriter
,
client
::
ClientInterface
&
client
,
TapeSingleThreadInterface
<
TapeWriteTask
Interface
>
&
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
)
...
...
castor/tape/tapeserver/daemon/MigrationTaskInjector.hpp
View file @
2547718e
...
...
@@ -48,7 +48,7 @@ public:
MigrationTaskInjector
(
MigrationMemoryManager
&
mm
,
DiskThreadPoolInterface
<
DiskReadTaskInterface
>
&
diskReader
,
TapeSingleThreadInterface
<
TapeWriteTask
>
&
tapeWriter
,
client
::
ClientInterface
&
client
,
TapeSingleThreadInterface
<
TapeWriteTask
Interface
>
&
tapeWriter
,
client
::
ClientInterface
&
client
,
castor
::
log
::
LogContext
lc
);
...
...
@@ -143,7 +143,7 @@ private:
MigrationMemoryManager
&
m_memManager
;
TapeSingleThreadInterface
<
TapeWriteTask
>&
m_tapeWriter
;
TapeSingleThreadInterface
<
TapeWriteTask
Interface
>&
m_tapeWriter
;
DiskThreadPoolInterface
<
DiskReadTaskInterface
>&
m_diskReader
;
client
::
ClientInterface
&
m_client
;
...
...
castor/tape/tapeserver/daemon/MountSession.cpp
View file @
2547718e
...
...
@@ -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
,
Migration
MemoryManager
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
LogContex
dois
t
::
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
()));
...
...
castor/tape/tapeserver/daemon/TapeWriteSingleThread.hpp
View file @
2547718e
...
...
@@ -38,15 +38,15 @@ namespace tape {
namespace
tapeserver
{
namespace
daemon
{
class
TapeWriteSingleThread
:
public
TapeSingleThreadInterface
<
TapeWriteTask
>
{
class
TapeWriteSingleThread
:
public
TapeSingleThreadInterface
<
TapeWriteTask
Interface
>
{
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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment