|
@@ -233,7 +233,9 @@ static int parse_fsopt_token(char *c, void *private)
|
|
break;
|
|
break;
|
|
/* misc */
|
|
/* misc */
|
|
case Opt_wsize:
|
|
case Opt_wsize:
|
|
- fsopt->wsize = intval;
|
|
|
|
|
|
+ if (intval < PAGE_SIZE || intval > CEPH_MAX_WRITE_SIZE)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ fsopt->wsize = ALIGN(intval, PAGE_SIZE);
|
|
break;
|
|
break;
|
|
case Opt_rsize:
|
|
case Opt_rsize:
|
|
if (intval < PAGE_SIZE || intval > CEPH_MAX_READ_SIZE)
|
|
if (intval < PAGE_SIZE || intval > CEPH_MAX_READ_SIZE)
|
|
@@ -392,6 +394,7 @@ static int parse_mount_options(struct ceph_mount_options **pfsopt,
|
|
fsopt->sb_flags = flags;
|
|
fsopt->sb_flags = flags;
|
|
fsopt->flags = CEPH_MOUNT_OPT_DEFAULT;
|
|
fsopt->flags = CEPH_MOUNT_OPT_DEFAULT;
|
|
|
|
|
|
|
|
+ fsopt->wsize = CEPH_MAX_WRITE_SIZE;
|
|
fsopt->rsize = CEPH_MAX_READ_SIZE;
|
|
fsopt->rsize = CEPH_MAX_READ_SIZE;
|
|
fsopt->rasize = CEPH_RASIZE_DEFAULT;
|
|
fsopt->rasize = CEPH_RASIZE_DEFAULT;
|
|
fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL);
|
|
fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL);
|