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
3e91229e
Commit
3e91229e
authored
Aug 19, 2014
by
Giuseppe Lo Presti
Browse files
Made setting of the checksum optional in RFIO, so to support RFIOv2
parent
591237b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
ns/oracleTrailer.sql
View file @
3e91229e
...
...
@@ -705,7 +705,9 @@ BEGIN
END
;
/
/* This procedure implements the Cns_closex API */
/* This procedure implements the Cns_closex API.
* inCksumType can be either 'AD' or 'NO' for no checksum.
*/
CREATE
OR
REPLACE
PROCEDURE
closex
(
inFid
IN
INTEGER
,
inFileSize
IN
INTEGER
,
inCksumType
IN
VARCHAR2
,
...
...
@@ -748,7 +750,7 @@ BEGIN
RETURN
;
END
IF
;
-- Validate checksum type
IF
inCksumType
!=
'AD'
THEN
IF
inCksumType
!=
'AD'
AND
inCksumType
!=
'NO'
THEN
outRC
:
=
serrno
.
EINVAL
;
outMsg
:
=
serrno
.
EINVAL_MSG
||
' : incorrect checksum type detected '
||
inCksumType
;
ROLLBACK
;
...
...
@@ -774,8 +776,8 @@ BEGIN
-- All right, update file size and other metadata
UPDATE
Cns_file_metadata
SET
fileSize
=
inFileSize
,
csumType
=
inCksumType
,
csumValue
=
inCksumValue
,
csumType
=
CASE
WHEN
inCksumType
!=
'NO'
THEN
inCksumType
ELSE
NULL
END
,
csumValue
=
CASE
WHEN
inCksumType
!=
'NO'
THEN
inCksumValue
ELSE
NULL
END
,
ctime
=
inMTime
,
mtime
=
inMTime
WHERE
fileId
=
inFid
;
...
...
rfio/rfio_callhandlers.c
View file @
3e91229e
...
...
@@ -169,11 +169,13 @@ int rfio_handle_close(void *ctx,
/* first we try to read a file xattr for checksum */
if
((
xattr_len
=
ceph_posix_getxattr
(
internal_context
->
pfn
,
"user.castor.checksum.value"
,
csumvalue
,
CA_MAXCKSUMLEN
))
==
-
1
)
{
(
*
logfunc
)(
LOG_ERR
,
"rfio_handle_close: getxattr failed for user.castor.checksum.value, skipping checksum. Error=%d
\n
"
,
errno
);
strcpy
(
csumtype
,
"NO"
);
}
else
{
csumvalue
[
xattr_len
]
=
'\0'
;
(
*
logfunc
)(
LOG_DEBUG
,
"rfio_handle_close: csumvalue for the file on the disk=0x%s
\n
"
,
csumvalue
);
if
((
xattr_len
=
ceph_posix_getxattr
(
internal_context
->
pfn
,
"user.castor.checksum.type"
,
csumtype
,
CA_MAXCKSUMNAMELEN
))
==
-
1
)
{
(
*
logfunc
)(
LOG_ERR
,
"rfio_handle_close: getxattr failed for user.castor.checksum.type, skipping checksum. Error=%d
\n
"
,
errno
);
strcpy
(
csumtype
,
"NO"
);
}
else
{
csumtype
[
xattr_len
]
=
'\0'
;
(
*
logfunc
)(
LOG_DEBUG
,
"rfio_handle_close: csumtype is %s
\n
"
,
csumtype
);
...
...
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