Commit 83817e35 authored by Sage Weil's avatar Sage Weil

ceph: rename rsize -> rasize

It controls readahead.
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 7c272194
...@@ -114,6 +114,7 @@ static int ceph_sync_fs(struct super_block *sb, int wait) ...@@ -114,6 +114,7 @@ static int ceph_sync_fs(struct super_block *sb, int wait)
enum { enum {
Opt_wsize, Opt_wsize,
Opt_rsize, Opt_rsize,
Opt_rasize,
Opt_caps_wanted_delay_min, Opt_caps_wanted_delay_min,
Opt_caps_wanted_delay_max, Opt_caps_wanted_delay_max,
Opt_cap_release_safety, Opt_cap_release_safety,
...@@ -136,6 +137,7 @@ enum { ...@@ -136,6 +137,7 @@ enum {
static match_table_t fsopt_tokens = { static match_table_t fsopt_tokens = {
{Opt_wsize, "wsize=%d"}, {Opt_wsize, "wsize=%d"},
{Opt_rsize, "rsize=%d"}, {Opt_rsize, "rsize=%d"},
{Opt_rasize, "rasize=%d"},
{Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"}, {Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"},
{Opt_caps_wanted_delay_max, "caps_wanted_delay_max=%d"}, {Opt_caps_wanted_delay_max, "caps_wanted_delay_max=%d"},
{Opt_cap_release_safety, "cap_release_safety=%d"}, {Opt_cap_release_safety, "cap_release_safety=%d"},
...@@ -196,6 +198,9 @@ static int parse_fsopt_token(char *c, void *private) ...@@ -196,6 +198,9 @@ static int parse_fsopt_token(char *c, void *private)
case Opt_rsize: case Opt_rsize:
fsopt->rsize = intval; fsopt->rsize = intval;
break; break;
case Opt_rasize:
fsopt->rasize = intval;
break;
case Opt_caps_wanted_delay_min: case Opt_caps_wanted_delay_min:
fsopt->caps_wanted_delay_min = intval; fsopt->caps_wanted_delay_min = intval;
break; break;
...@@ -293,6 +298,7 @@ static int parse_mount_options(struct ceph_mount_options **pfsopt, ...@@ -293,6 +298,7 @@ static int parse_mount_options(struct ceph_mount_options **pfsopt,
fsopt->flags = CEPH_MOUNT_OPT_DEFAULT; fsopt->flags = CEPH_MOUNT_OPT_DEFAULT;
fsopt->rsize = CEPH_RSIZE_DEFAULT; fsopt->rsize = CEPH_RSIZE_DEFAULT;
fsopt->rasize = CEPH_RASIZE_DEFAULT;
fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL); fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL);
fsopt->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT; fsopt->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT;
fsopt->caps_wanted_delay_max = CEPH_CAPS_WANTED_DELAY_MAX_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) ...@@ -376,6 +382,8 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)
seq_printf(m, ",wsize=%d", fsopt->wsize); seq_printf(m, ",wsize=%d", fsopt->wsize);
if (fsopt->rsize != CEPH_RSIZE_DEFAULT) if (fsopt->rsize != CEPH_RSIZE_DEFAULT)
seq_printf(m, ",rsize=%d", fsopt->rsize); 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()) if (fsopt->congestion_kb != default_congestion_kb())
seq_printf(m, ",write_congestion_kb=%d", fsopt->congestion_kb); seq_printf(m, ",write_congestion_kb=%d", fsopt->congestion_kb);
if (fsopt->caps_wanted_delay_min != CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT) 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,10 +782,10 @@ static int ceph_register_bdi(struct super_block *sb,
{ {
int err; int err;
/* set ra_pages based on rsize mount option? */ /* set ra_pages based on rasize mount option? */
if (fsc->mount_options->rsize >= PAGE_CACHE_SIZE) if (fsc->mount_options->rasize >= PAGE_CACHE_SIZE)
fsc->backing_dev_info.ra_pages = fsc->backing_dev_info.ra_pages =
(fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1) (fsc->mount_options->rasize + PAGE_CACHE_SIZE - 1)
>> PAGE_SHIFT; >> PAGE_SHIFT;
else else
fsc->backing_dev_info.ra_pages = fsc->backing_dev_info.ra_pages =
......
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#define ceph_test_mount_opt(fsc, opt) \ #define ceph_test_mount_opt(fsc, opt) \
(!!((fsc)->mount_options->flags & CEPH_MOUNT_OPT_##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_DEFAULT 1024
#define CEPH_MAX_READDIR_BYTES_DEFAULT (512*1024) #define CEPH_MAX_READDIR_BYTES_DEFAULT (512*1024)
#define CEPH_SNAPDIRNAME_DEFAULT ".snap" #define CEPH_SNAPDIRNAME_DEFAULT ".snap"
...@@ -45,8 +46,9 @@ struct ceph_mount_options { ...@@ -45,8 +46,9 @@ struct ceph_mount_options {
int flags; int flags;
int sb_flags; int sb_flags;
int wsize; int wsize; /* max write size */
int rsize; /* max readahead */ int rsize; /* max read size */
int rasize; /* max readahead */
int congestion_kb; /* max writeback in flight */ int congestion_kb; /* max writeback in flight */
int caps_wanted_delay_min, caps_wanted_delay_max; int caps_wanted_delay_min, caps_wanted_delay_max;
int cap_release_safety; int cap_release_safety;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment