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
nexedi
linux
Commits
83817e35
Commit
83817e35
authored
Aug 04, 2011
by
Sage Weil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: rename rsize -> rasize
It controls readahead. Signed-off-by:
Sage Weil
<
sage@newdream.net
>
parent
7c272194
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
fs/ceph/super.c
fs/ceph/super.c
+11
-3
fs/ceph/super.h
fs/ceph/super.h
+5
-3
No files found.
fs/ceph/super.c
View file @
83817e35
...
...
@@ -114,6 +114,7 @@ static int ceph_sync_fs(struct super_block *sb, int wait)
enum
{
Opt_wsize
,
Opt_rsize
,
Opt_rasize
,
Opt_caps_wanted_delay_min
,
Opt_caps_wanted_delay_max
,
Opt_cap_release_safety
,
...
...
@@ -136,6 +137,7 @@ enum {
static
match_table_t
fsopt_tokens
=
{
{
Opt_wsize
,
"wsize=%d"
},
{
Opt_rsize
,
"rsize=%d"
},
{
Opt_rasize
,
"rasize=%d"
},
{
Opt_caps_wanted_delay_min
,
"caps_wanted_delay_min=%d"
},
{
Opt_caps_wanted_delay_max
,
"caps_wanted_delay_max=%d"
},
{
Opt_cap_release_safety
,
"cap_release_safety=%d"
},
...
...
@@ -196,6 +198,9 @@ static int parse_fsopt_token(char *c, void *private)
case
Opt_rsize
:
fsopt
->
rsize
=
intval
;
break
;
case
Opt_rasize
:
fsopt
->
rasize
=
intval
;
break
;
case
Opt_caps_wanted_delay_min
:
fsopt
->
caps_wanted_delay_min
=
intval
;
break
;
...
...
@@ -293,6 +298,7 @@ static int parse_mount_options(struct ceph_mount_options **pfsopt,
fsopt
->
flags
=
CEPH_MOUNT_OPT_DEFAULT
;
fsopt
->
rsize
=
CEPH_RSIZE_DEFAULT
;
fsopt
->
rasize
=
CEPH_RASIZE_DEFAULT
;
fsopt
->
snapdir_name
=
kstrdup
(
CEPH_SNAPDIRNAME_DEFAULT
,
GFP_KERNEL
);
fsopt
->
caps_wanted_delay_min
=
CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT
;
fsopt
->
caps_wanted_delay_max
=
CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT
;
...
...
@@ -376,6 +382,8 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)
seq_printf
(
m
,
",wsize=%d"
,
fsopt
->
wsize
);
if
(
fsopt
->
rsize
!=
CEPH_RSIZE_DEFAULT
)
seq_printf
(
m
,
",rsize=%d"
,
fsopt
->
rsize
);
if
(
fsopt
->
rasize
!=
CEPH_RASIZE_DEFAULT
)
seq_printf
(
m
,
",rasize=%d"
,
fsopt
->
rsize
);
if
(
fsopt
->
congestion_kb
!=
default_congestion_kb
())
seq_printf
(
m
,
",write_congestion_kb=%d"
,
fsopt
->
congestion_kb
);
if
(
fsopt
->
caps_wanted_delay_min
!=
CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT
)
...
...
@@ -774,10 +782,10 @@ static int ceph_register_bdi(struct super_block *sb,
{
int
err
;
/* set ra_pages based on rsize mount option? */
if
(
fsc
->
mount_options
->
rsize
>=
PAGE_CACHE_SIZE
)
/* set ra_pages based on r
a
size mount option? */
if
(
fsc
->
mount_options
->
r
a
size
>=
PAGE_CACHE_SIZE
)
fsc
->
backing_dev_info
.
ra_pages
=
(
fsc
->
mount_options
->
rsize
+
PAGE_CACHE_SIZE
-
1
)
(
fsc
->
mount_options
->
r
a
size
+
PAGE_CACHE_SIZE
-
1
)
>>
PAGE_SHIFT
;
else
fsc
->
backing_dev_info
.
ra_pages
=
...
...
fs/ceph/super.h
View file @
83817e35
...
...
@@ -36,7 +36,8 @@
#define ceph_test_mount_opt(fsc, opt) \
(!!((fsc)->mount_options->flags & CEPH_MOUNT_OPT_##opt))
#define CEPH_RSIZE_DEFAULT (512*1024)
/* readahead */
#define CEPH_RSIZE_DEFAULT 0
/* max read size */
#define CEPH_RASIZE_DEFAULT (8192*1024)
/* readahead */
#define CEPH_MAX_READDIR_DEFAULT 1024
#define CEPH_MAX_READDIR_BYTES_DEFAULT (512*1024)
#define CEPH_SNAPDIRNAME_DEFAULT ".snap"
...
...
@@ -45,8 +46,9 @@ struct ceph_mount_options {
int
flags
;
int
sb_flags
;
int
wsize
;
int
rsize
;
/* max readahead */
int
wsize
;
/* max write size */
int
rsize
;
/* max read size */
int
rasize
;
/* max readahead */
int
congestion_kb
;
/* max writeback in flight */
int
caps_wanted_delay_min
,
caps_wanted_delay_max
;
int
cap_release_safety
;
...
...
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