diff options
author | Sage Weil <sage@newdream.net> | 2011-08-04 11:03:44 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-10-25 19:10:15 -0400 |
commit | 83817e35cbd9b36db955a22418c9e30324353587 (patch) | |
tree | bd2e52d560e74061310e27ef4028a4f2c75c9801 /fs/ceph | |
parent | 7c272194e66e91830b90f6202e61c69f8590f1eb (diff) |
ceph: rename rsize -> rasize
It controls readahead.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/super.c | 14 | ||||
-rw-r--r-- | fs/ceph/super.h | 8 |
2 files changed, 16 insertions, 6 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 88bacaf385d9..387addbf942e 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -114,6 +114,7 @@ static int ceph_sync_fs(struct super_block *sb, int wait) | |||
114 | enum { | 114 | enum { |
115 | Opt_wsize, | 115 | Opt_wsize, |
116 | Opt_rsize, | 116 | Opt_rsize, |
117 | Opt_rasize, | ||
117 | Opt_caps_wanted_delay_min, | 118 | Opt_caps_wanted_delay_min, |
118 | Opt_caps_wanted_delay_max, | 119 | Opt_caps_wanted_delay_max, |
119 | Opt_cap_release_safety, | 120 | Opt_cap_release_safety, |
@@ -136,6 +137,7 @@ enum { | |||
136 | static match_table_t fsopt_tokens = { | 137 | static match_table_t fsopt_tokens = { |
137 | {Opt_wsize, "wsize=%d"}, | 138 | {Opt_wsize, "wsize=%d"}, |
138 | {Opt_rsize, "rsize=%d"}, | 139 | {Opt_rsize, "rsize=%d"}, |
140 | {Opt_rasize, "rasize=%d"}, | ||
139 | {Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"}, | 141 | {Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"}, |
140 | {Opt_caps_wanted_delay_max, "caps_wanted_delay_max=%d"}, | 142 | {Opt_caps_wanted_delay_max, "caps_wanted_delay_max=%d"}, |
141 | {Opt_cap_release_safety, "cap_release_safety=%d"}, | 143 | {Opt_cap_release_safety, "cap_release_safety=%d"}, |
@@ -196,6 +198,9 @@ static int parse_fsopt_token(char *c, void *private) | |||
196 | case Opt_rsize: | 198 | case Opt_rsize: |
197 | fsopt->rsize = intval; | 199 | fsopt->rsize = intval; |
198 | break; | 200 | break; |
201 | case Opt_rasize: | ||
202 | fsopt->rasize = intval; | ||
203 | break; | ||
199 | case Opt_caps_wanted_delay_min: | 204 | case Opt_caps_wanted_delay_min: |
200 | fsopt->caps_wanted_delay_min = intval; | 205 | fsopt->caps_wanted_delay_min = intval; |
201 | break; | 206 | break; |
@@ -293,6 +298,7 @@ static int parse_mount_options(struct ceph_mount_options **pfsopt, | |||
293 | fsopt->flags = CEPH_MOUNT_OPT_DEFAULT; | 298 | fsopt->flags = CEPH_MOUNT_OPT_DEFAULT; |
294 | 299 | ||
295 | fsopt->rsize = CEPH_RSIZE_DEFAULT; | 300 | fsopt->rsize = CEPH_RSIZE_DEFAULT; |
301 | fsopt->rasize = CEPH_RASIZE_DEFAULT; | ||
296 | fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL); | 302 | fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL); |
297 | fsopt->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT; | 303 | fsopt->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT; |
298 | fsopt->caps_wanted_delay_max = CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT; | 304 | 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) | |||
376 | seq_printf(m, ",wsize=%d", fsopt->wsize); | 382 | seq_printf(m, ",wsize=%d", fsopt->wsize); |
377 | if (fsopt->rsize != CEPH_RSIZE_DEFAULT) | 383 | if (fsopt->rsize != CEPH_RSIZE_DEFAULT) |
378 | seq_printf(m, ",rsize=%d", fsopt->rsize); | 384 | seq_printf(m, ",rsize=%d", fsopt->rsize); |
385 | if (fsopt->rasize != CEPH_RASIZE_DEFAULT) | ||
386 | seq_printf(m, ",rasize=%d", fsopt->rsize); | ||
379 | if (fsopt->congestion_kb != default_congestion_kb()) | 387 | if (fsopt->congestion_kb != default_congestion_kb()) |
380 | seq_printf(m, ",write_congestion_kb=%d", fsopt->congestion_kb); | 388 | seq_printf(m, ",write_congestion_kb=%d", fsopt->congestion_kb); |
381 | if (fsopt->caps_wanted_delay_min != CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT) | 389 | 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, | |||
774 | { | 782 | { |
775 | int err; | 783 | int err; |
776 | 784 | ||
777 | /* set ra_pages based on rsize mount option? */ | 785 | /* set ra_pages based on rasize mount option? */ |
778 | if (fsc->mount_options->rsize >= PAGE_CACHE_SIZE) | 786 | if (fsc->mount_options->rasize >= PAGE_CACHE_SIZE) |
779 | fsc->backing_dev_info.ra_pages = | 787 | fsc->backing_dev_info.ra_pages = |
780 | (fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1) | 788 | (fsc->mount_options->rasize + PAGE_CACHE_SIZE - 1) |
781 | >> PAGE_SHIFT; | 789 | >> PAGE_SHIFT; |
782 | else | 790 | else |
783 | fsc->backing_dev_info.ra_pages = | 791 | fsc->backing_dev_info.ra_pages = |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index a23eed526f05..5c72430b8f71 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -36,7 +36,8 @@ | |||
36 | #define ceph_test_mount_opt(fsc, opt) \ | 36 | #define ceph_test_mount_opt(fsc, opt) \ |
37 | (!!((fsc)->mount_options->flags & CEPH_MOUNT_OPT_##opt)) | 37 | (!!((fsc)->mount_options->flags & CEPH_MOUNT_OPT_##opt)) |
38 | 38 | ||
39 | #define CEPH_RSIZE_DEFAULT (512*1024) /* readahead */ | 39 | #define CEPH_RSIZE_DEFAULT 0 /* max read size */ |
40 | #define CEPH_RASIZE_DEFAULT (8192*1024) /* readahead */ | ||
40 | #define CEPH_MAX_READDIR_DEFAULT 1024 | 41 | #define CEPH_MAX_READDIR_DEFAULT 1024 |
41 | #define CEPH_MAX_READDIR_BYTES_DEFAULT (512*1024) | 42 | #define CEPH_MAX_READDIR_BYTES_DEFAULT (512*1024) |
42 | #define CEPH_SNAPDIRNAME_DEFAULT ".snap" | 43 | #define CEPH_SNAPDIRNAME_DEFAULT ".snap" |
@@ -45,8 +46,9 @@ struct ceph_mount_options { | |||
45 | int flags; | 46 | int flags; |
46 | int sb_flags; | 47 | int sb_flags; |
47 | 48 | ||
48 | int wsize; | 49 | int wsize; /* max write size */ |
49 | int rsize; /* max readahead */ | 50 | int rsize; /* max read size */ |
51 | int rasize; /* max readahead */ | ||
50 | int congestion_kb; /* max writeback in flight */ | 52 | int congestion_kb; /* max writeback in flight */ |
51 | int caps_wanted_delay_min, caps_wanted_delay_max; | 53 | int caps_wanted_delay_min, caps_wanted_delay_max; |
52 | int cap_release_safety; | 54 | int cap_release_safety; |