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
nfs4j
Commits
7d14d29c
Unverified
Commit
7d14d29c
authored
May 20, 2020
by
Tigran Mkrtchyan
☕
Committed by
GitHub
May 20, 2020
Browse files
Merge pull request #87 from iterate-ch/bugfix/issue-86
Expose case sensitivity settings
parents
59550a9c
ae9e3d48
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/src/main/java/org/dcache/nfs/v4/OperationGETATTR.java
View file @
7d14d29c
...
...
@@ -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 @
7d14d29c
...
...
@@ -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 @
7d14d29c
...
...
@@ -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 @
7d14d29c
...
...
@@ -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 @
7d14d29c
...
...
@@ -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
.
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