Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
nfs4j
Commits
0250c8e0
Commit
0250c8e0
authored
Nov 19, 2011
by
Tigran Mkrtchyan
☕
Browse files
nfsv3: do not log client errors with error level
parent
4c2fa99f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/org/dcache/chimera/nfs/ChimeraNFSException.java
View file @
0250c8e0
...
...
@@ -33,4 +33,9 @@ public class ChimeraNFSException extends java.io.IOException {
public
int
getStatus
()
{
return
nfsStatus
;
}
@Override
public
String
toString
()
{
return
super
.
toString
()
+
" NFS status: "
+
nfsStatus
;
}
}
src/org/dcache/chimera/nfs/v3/NfsServerV3.java
View file @
0250c8e0
...
...
@@ -253,6 +253,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resok
.
access
=
new
uint32
(
realAccess
);
}
catch
(
ChimeraNFSException
hne
)
{
_log
.
error
(
"ACCESS: {}"
,
hne
);
res
.
status
=
hne
.
getStatus
();
res
.
resfail
=
new
ACCESS3resfail
();
res
.
resfail
.
obj_attributes
=
defaultPostOpAttr
();
...
...
@@ -268,11 +269,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
obj_attributes
=
defaultPostOpAttr
();
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"Access failed : {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
@Override
...
...
@@ -394,11 +391,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
dir_wcc
=
defaultWccData
();
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"create failed : {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
@Override
...
...
@@ -460,11 +453,6 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
obj_attributes
=
defaultPostOpAttr
();
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"FSinfo failed : {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
...
...
@@ -509,12 +497,6 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
obj_attributes
=
defaultPostOpAttr
();
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"FSSTAT ({}) failed: {}"
,
new
Object
[]{
new
String
(
arg1
.
fsroot
.
data
),
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
)
});
}
return
res
;
}
...
...
@@ -537,6 +519,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
HimeraNfsUtils
.
fill_attributes
(
inode
.
stat
(),
res
.
resok
.
obj_attributes
);
}
catch
(
FileNotFoundHimeraFsException
fnf
)
{
_log
.
debug
(
"GETATTR: file does not exists: {}"
,
fnf
.
toString
());
res
.
status
=
nfsstat3
.
NFS3ERR_NOENT
;
}
catch
(
ChimeraFsException
e
)
{
_log
.
error
(
"GETATTR"
,
e
);
...
...
@@ -546,10 +529,6 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
status
=
nfsstat3
.
NFS3ERR_SERVERFAULT
;
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"Getattr failed : {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
...
...
@@ -666,6 +645,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
HimeraNfsUtils
.
fill_attributes
(
parent
.
stat
(),
res
.
resok
.
dir_attributes
.
attributes
);
}
catch
(
ChimeraNFSException
hne
)
{
_log
.
debug
(
"lookup {}"
,
hne
.
toString
());
res
.
status
=
hne
.
getStatus
();
res
.
resfail
=
new
LOOKUP3resfail
();
res
.
resfail
.
dir_attributes
=
defaultPostOpAttr
();
...
...
@@ -681,11 +661,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
dir_attributes
=
defaultPostOpAttr
();
}
if
((
res
.
status
!=
nfsstat3
.
NFS3_OK
)
&&
(
res
.
status
!=
nfsstat3
.
NFS3ERR_NOENT
))
{
_log
.
error
(
"lookup {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
@Override
...
...
@@ -984,6 +960,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resok
.
reply
.
eof
=
true
;
}
catch
(
ChimeraNFSException
hne
)
{
_log
.
debug
(
"READDIRPLUS3 status: {}"
,
hne
.
toString
());
res
.
resfail
=
new
READDIRPLUS3resfail
();
res
.
resfail
.
dir_attributes
=
defaultPostOpAttr
();
res
.
status
=
hne
.
getStatus
();
...
...
@@ -999,9 +976,6 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
dir_attributes
=
defaultPostOpAttr
();
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"READDIRPLUS3 status - {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
...
...
@@ -1120,6 +1094,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resok
.
reply
.
eof
=
true
;
}
catch
(
ChimeraNFSException
hne
)
{
_log
.
error
(
"READDIR: {}"
,
hne
.
toString
());
res
.
resfail
=
new
READDIR3resfail
();
res
.
resfail
.
dir_attributes
=
defaultPostOpAttr
();
res
.
status
=
hne
.
getStatus
();
...
...
@@ -1135,11 +1110,7 @@ public class NfsServerV3 extends nfs3_protServerStub {
res
.
resfail
.
dir_attributes
=
defaultPostOpAttr
();
}
if
(
res
.
status
!=
nfsstat3
.
NFS3_OK
)
{
_log
.
error
(
"READDIR status - {}"
,
HimeraNfsUtils
.
nfsErr2String
(
res
.
status
));
}
return
res
;
}
@Override
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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