Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e2c3de04
Commit
e2c3de04
authored
Mar 04, 2015
by
Yan, Zheng
Committed by
Ilya Dryomov
Apr 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: fix dcache/nocache mount option
Signed-off-by:
Yan, Zheng
<
zyan@redhat.com
>
parent
6e6f0923
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
fs/ceph/dir.c
fs/ceph/dir.c
+2
-0
fs/ceph/super.h
fs/ceph/super.h
+2
-1
No files found.
fs/ceph/dir.c
View file @
e2c3de04
...
...
@@ -281,6 +281,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
/* can we use the dcache? */
spin_lock
(
&
ci
->
i_ceph_lock
);
if
((
ctx
->
pos
==
2
||
fi
->
dentry
)
&&
ceph_test_mount_opt
(
fsc
,
DCACHE
)
&&
!
ceph_test_mount_opt
(
fsc
,
NOASYNCREADDIR
)
&&
ceph_snap
(
inode
)
!=
CEPH_SNAPDIR
&&
__ceph_dir_is_complete_ordered
(
ci
)
&&
...
...
@@ -629,6 +630,7 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
fsc
->
mount_options
->
snapdir_name
,
dentry
->
d_name
.
len
)
&&
!
is_root_ceph_dentry
(
dir
,
dentry
)
&&
ceph_test_mount_opt
(
fsc
,
DCACHE
)
&&
__ceph_dir_is_complete
(
ci
)
&&
(
__ceph_caps_issued_mask
(
ci
,
CEPH_CAP_FILE_SHARED
,
1
)))
{
spin_unlock
(
&
ci
->
i_ceph_lock
);
...
...
fs/ceph/super.h
View file @
e2c3de04
...
...
@@ -36,7 +36,8 @@
#define CEPH_MOUNT_OPT_DCACHE (1<<9)
/* use dcache for readdir etc */
#define CEPH_MOUNT_OPT_FSCACHE (1<<10)
/* use fscache */
#define CEPH_MOUNT_OPT_DEFAULT (CEPH_MOUNT_OPT_RBYTES)
#define CEPH_MOUNT_OPT_DEFAULT (CEPH_MOUNT_OPT_RBYTES | \
CEPH_MOUNT_OPT_DCACHE)
#define ceph_set_mount_opt(fsc, opt) \
(fsc)->mount_options->flags |= CEPH_MOUNT_OPT_##opt;
...
...
Write
Preview
Markdown
is supported
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