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
09adaaa1
Commit
09adaaa1
authored
Aug 30, 2016
by
Victor Kotlyar
Browse files
Renamed castor::exception::MemException to
cta::exception::MemException
parent
d4bf2817
Changes
4
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor
/exception/MemException.hpp
→
common
/exception/MemException.hpp
View file @
09adaaa1
...
...
@@ -25,7 +25,7 @@
#include
"common/exception/Exception.hpp"
#include
<string>
namespace
ca
stor
{
namespace
c
t
a
{
namespace
exception
{
/**
* A generic exception thrown when there is something wrong with the memory
...
...
tapeserver/castor/tape/tapeserver/daemon/DataPipeline.hpp
View file @
09adaaa1
...
...
@@ -72,7 +72,7 @@ public:
{
castor
::
server
::
MutexLocker
ml
(
&
m_countersMutex
);
if
(
m_freeBlocksProvided
>=
m_blocksNeeded
)
{
throw
ca
stor
::
exception
::
MemException
(
"DataFifo overflow on free blocks"
);
throw
c
t
a
::
exception
::
MemException
(
"DataFifo overflow on free blocks"
);
}
m_freeBlocksProvided
++
;
ret
=
m_freeBlocksProvided
<
m_blocksNeeded
;
...
...
@@ -106,7 +106,7 @@ public:
{
castor
::
server
::
MutexLocker
ml
(
&
m_countersMutex
);
if
(
m_dataBlocksPushed
>=
m_blocksNeeded
)
throw
ca
stor
::
exception
::
MemException
(
"DataFifo overflow on data blocks"
);
throw
c
t
a
::
exception
::
MemException
(
"DataFifo overflow on data blocks"
);
}
m_dataBlocks
.
push
(
mb
);
{
...
...
tapeserver/castor/tape/tapeserver/daemon/Payload.hpp
View file @
09adaaa1
...
...
@@ -23,7 +23,7 @@
#include
<zlib.h>
#include
"castor/tape/tapeserver/file/DiskFile.hpp"
#include
"castor/tape/tapeserver/file/File.hpp"
#include
"c
astor
/exception/MemException.hpp"
#include
"c
ommon
/exception/MemException.hpp"
#include
"common/exception/EndOfFile.hpp"
#pragma once
...
...
@@ -45,7 +45,7 @@ public:
Payload
(
size_t
capacity
)
:
m_data
(
new
(
std
::
nothrow
)
unsigned
char
[
capacity
]),
m_totalCapacity
(
capacity
),
m_size
(
0
)
{
if
(
NULL
==
m_data
)
{
throw
ca
stor
::
exception
::
MemException
(
"Failed to allocate memory for a new MemBlock!"
);
throw
c
t
a
::
exception
::
MemException
(
"Failed to allocate memory for a new MemBlock!"
);
}
}
...
...
@@ -104,7 +104,7 @@ public:
err
<<
"Trying to read a tape file block with too little space left: BlockSize="
<<
from
.
getBlockSize
()
<<
" remainingFreeSpace="
<<
remainingFreeSpace
()
<<
" (totalSize="
<<
m_totalCapacity
<<
")"
;
throw
ca
stor
::
exception
::
MemException
(
err
.
str
());
throw
c
t
a
::
exception
::
MemException
(
err
.
str
());
}
size_t
readSize
;
try
{
...
...
tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
View file @
09adaaa1
...
...
@@ -27,7 +27,7 @@
#include
"castor/utils/Timer.hpp"
#include
"castor/utils/CRC.hpp"
#include
"c
astor
/exception/MemException.hpp"
#include
"c
ommon
/exception/MemException.hpp"
namespace
castor
{
namespace
tape
{
...
...
@@ -698,7 +698,7 @@ void drive::DriveGeneric::writeBlock(const void * data, size_t count) {
uint8_t
*
dataWithCrc32c
=
(
new
(
std
::
nothrow
)
uint8_t
[
count
+
SCSI
::
logicBlockProtectionMethod
::
CRC32CLength
]);
if
(
NULL
==
dataWithCrc32c
)
{
throw
ca
stor
::
exception
::
MemException
(
"Failed to allocate memory "
throw
c
t
a
::
exception
::
MemException
(
"Failed to allocate memory "
" for a new MemBlock in DriveGeneric::writeBlock!"
);
}
memcpy
(
dataWithCrc32c
,
data
,
count
);
...
...
@@ -752,7 +752,7 @@ ssize_t drive::DriveGeneric::readBlock(void * data, size_t count) {
uint8_t
*
dataWithCrc32c
=
(
new
(
std
::
nothrow
)
uint8_t
[
count
+
SCSI
::
logicBlockProtectionMethod
::
CRC32CLength
]);
if
(
NULL
==
dataWithCrc32c
)
{
throw
ca
stor
::
exception
::
MemException
(
"In DriveGeneric::readBlock: Failed to allocate memory"
);
throw
c
t
a
::
exception
::
MemException
(
"In DriveGeneric::readBlock: Failed to allocate memory"
);
}
ssize_t
res
=
m_sysWrapper
.
read
(
m_tapeFD
,
dataWithCrc32c
,
count
+
SCSI
::
logicBlockProtectionMethod
::
CRC32CLength
);
...
...
@@ -812,7 +812,7 @@ void drive::DriveGeneric::readExactBlock(void * data, size_t count, std::string
uint8_t
*
dataWithCrc32c
=
(
new
(
std
::
nothrow
)
uint8_t
[
count
+
SCSI
::
logicBlockProtectionMethod
::
CRC32CLength
]);
if
(
NULL
==
dataWithCrc32c
)
{
throw
ca
stor
::
exception
::
MemException
(
"Failed to allocate memory "
throw
c
t
a
::
exception
::
MemException
(
"Failed to allocate memory "
" for a new MemBlock in DriveGeneric::readBlock!"
);
}
ssize_t
res
=
m_sysWrapper
.
read
(
m_tapeFD
,
dataWithCrc32c
,
...
...
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