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
1911f778
Commit
1911f778
authored
Jul 23, 2014
by
David COME
Browse files
Updated some comments
parent
71a7728a
Changes
3
Hide whitespace changes
Inline
Side-by-side
castor/tape/reactor/ZMQPollEventHandler.hpp
View file @
1911f778
...
...
@@ -46,19 +46,7 @@ public:
/**
* Destructor.
*
* This destructor should be virtual, but it is temporarily not in order to
* keep the system running ableit with file descriptor leaks.
*
* When this destructor is made virtual, please uncomment the following
* unit test in order to prove that file descriptors are being closed
* correctly.
*
* File: castor/tape/reactor/ZMQReactorTest.cpp
* Test: TEST_F(castor_tape_reactor_ZMQReactorTest, closeFd)
* Valrgind command-line: valgrind --track-fds=yes test/castorUnitTests
*/
//~ZMQPollEventHandler() throw();
virtual
~
ZMQPollEventHandler
()
throw
()
=
0
;
/**
...
...
castor/tape/tapeserver/daemon/Payload.hpp
View file @
1911f778
...
...
@@ -141,6 +141,17 @@ public:
to
.
write
(
m_data
+
writePosition
,
m_size
-
writePosition
);
}
}
/*
Example for the Adler32
* unsigned long chck = Pyaload::zeroAdler32();
* while() {
* payload.read(from);
* chck = payload.adler32(chck);
* }
*/
/**
* Compute adler32 checksum on the current data hold.
* @param previous The previous adler32 checksum from all previous datablock
...
...
@@ -149,6 +160,10 @@ public:
unsigned
long
adler32
(
unsigned
long
previous
){
return
::
adler32
(
previous
,
m_data
,
m_size
);
}
/**
* Return the initial value for computing Adler32 checksum
*/
static
unsigned
long
zeroAdler32
()
{
return
::
adler32
(
0L
,
Z_NULL
,
0
);
}
...
...
castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp
View file @
1911f778
...
...
@@ -24,7 +24,9 @@
#include
"castor/tape/tapeserver/daemon/TapeWriteSingleThread.hpp"
//------------------------------------------------------------------------------
//constructor
//------------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
TapeWriteSingleThread
::
TapeWriteSingleThread
(
castor
::
tape
::
tapeserver
::
drives
::
DriveInterface
&
drive
,
castor
::
legacymsg
::
RmcProxy
&
rmc
,
...
...
@@ -39,12 +41,16 @@ castor::tape::tapeserver::drives::DriveInterface & drive,
m_drive
(
drive
),
m_reportPacker
(
repPacker
),
m_lastFseq
(
-
1
),
m_compress
(
true
)
{}
//------------------------------------------------------------------------------
//setlastFseq
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeWriteSingleThread
::
setlastFseq
(
uint64_t
lastFseq
){
m_lastFseq
=
lastFseq
;
}
//------------------------------------------------------------------------------
//openWriteSession
//------------------------------------------------------------------------------
std
::
auto_ptr
<
castor
::
tape
::
tapeFile
::
WriteSession
>
castor
::
tape
::
tapeserver
::
daemon
::
TapeWriteSingleThread
::
openWriteSession
()
{
using
castor
::
log
::
LogContext
;
...
...
@@ -75,7 +81,9 @@ castor::tape::tapeserver::daemon::TapeWriteSingleThread::openWriteSession() {
}
return
writeSession
;
}
//------------------------------------------------------------------------------
//tapeFlush
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeWriteSingleThread
::
tapeFlush
(
const
std
::
string
&
message
,
uint64_t
bytes
,
uint64_t
files
,
utils
::
Timer
&
timer
)
...
...
@@ -91,7 +99,9 @@ tapeFlush(const std::string& message,uint64_t bytes,uint64_t files,
m_stats
.
flushTime
+=
flushTime
;
}
//------------------------------------------------------------------------------
//run
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeWriteSingleThread
::
run
()
{
m_logContext
.
pushOrReplace
(
log
::
Param
(
"thread"
,
"TapeWrite"
));
castor
::
tape
::
utils
::
Timer
timer
,
totalTimer
;
...
...
@@ -100,6 +110,8 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() {
// Set capabilities allowing rawio (and hence arbitrary SCSI commands)
// through the st driver file descriptor.
setCapabilities
();
//pair of brackets to create an artficial scope for the tape cleaning
{
//log and notify
m_logContext
.
log
(
LOG_INFO
,
"Starting tape write thread"
);
...
...
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