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
ae9e3d48
Unverified
Commit
ae9e3d48
authored
May 20, 2020
by
David Kocher
Browse files
Expose case sensitivity settings
Signed-off-by:
David Kocher
<
dkocher@iterate.ch
>
parent
59550a9c
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/src/main/java/org/dcache/nfs/v4/OperationGETATTR.java
View file @
ae9e3d48
...
...
@@ -250,9 +250,9 @@ public class OperationGETATTR extends AbstractNFSv4Operation {
case
nfs4_prot
.
FATTR4_CANSETTIME
:
return
Optional
.
of
(
new
fattr4_cansettime
(
true
));
case
nfs4_prot
.
FATTR4_CASE_INSENSITIVE
:
return
Optional
.
of
(
new
fattr4_case_insensitive
(
true
));
return
Optional
.
of
(
new
fattr4_case_insensitive
(
fs
.
getCaseInsensitive
()
));
case
nfs4_prot
.
FATTR4_CASE_PRESERVING
:
return
Optional
.
of
(
new
fattr4_case_preserving
(
true
));
return
Optional
.
of
(
new
fattr4_case_preserving
(
fs
.
getCasePreserving
()
));
case
nfs4_prot
.
FATTR4_CHOWN_RESTRICTED
:
return
Optional
.
empty
();
case
nfs4_prot
.
FATTR4_FILEID
:
...
...
core/src/main/java/org/dcache/nfs/vfs/ForwardingFileSystem.java
View file @
ae9e3d48
...
...
@@ -140,6 +140,16 @@ public abstract class ForwardingFileSystem implements VirtualFileSystem {
delegate
().
setAcl
(
inode
,
acl
);
}
@Override
public
boolean
getCaseInsensitive
()
{
return
delegate
().
getCaseInsensitive
();
}
@Override
public
boolean
getCasePreserving
()
{
return
delegate
().
getCasePreserving
();
}
@Override
public
boolean
hasIOLayout
(
Inode
inode
)
throws
IOException
{
return
delegate
().
hasIOLayout
(
inode
);
...
...
core/src/main/java/org/dcache/nfs/vfs/VfsCache.java
View file @
ae9e3d48
...
...
@@ -183,6 +183,16 @@ public class VfsCache extends ForwardingFileSystem {
invalidateStatCache
(
inode
);
}
@Override
public
boolean
getCaseInsensitive
()
{
return
_inner
.
getCaseInsensitive
();
}
@Override
public
boolean
getCasePreserving
()
{
return
_inner
.
getCasePreserving
();
}
/*
Utility methods for cache manipulation.
*/
...
...
core/src/main/java/org/dcache/nfs/vfs/VirtualFileSystem.java
View file @
ae9e3d48
...
...
@@ -297,6 +297,18 @@ public interface VirtualFileSystem {
*/
NfsIdMapping
getIdMapper
();
/**
* Determins if this file system is case insensitive.
* @return
*/
boolean
getCaseInsensitive
();
/**
* Determines if this case insensitive file system is case preserving.
* @return
*/
boolean
getCasePreserving
();
/**
* Object which represents write operation result.
*/
...
...
core/src/test/java/org/dcache/nfs/vfs/DummyVFS.java
View file @
ae9e3d48
...
...
@@ -583,6 +583,16 @@ public class DummyVFS implements VirtualFileSystem {
return
_idMapper
;
}
@Override
public
boolean
getCaseInsensitive
()
{
return
true
;
}
@Override
public
boolean
getCasePreserving
()
{
return
true
;
}
@Override
public
byte
[]
getXattr
(
Inode
inode
,
String
attr
)
throws
IOException
{
long
inodeNumber
=
toInodeNumber
(
inode
);
...
...
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