ceph: fix alignment of rasize
authorChengguang Xu <cgxu519@gmx.com>
Wed, 30 May 2018 02:13:11 +0000 (10:13 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 4 Jun 2018 18:46:01 +0000 (20:46 +0200)
On currently logic:
when I specify rasize=0~1 then it will be 4096.
when I specify rasize=2~4097 then it will be 8192.

Make it the same as rsize & wsize.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.c

index a8e8e26..b4ff139 100644 (file)
@@ -271,7 +271,7 @@ static int parse_fsopt_token(char *c, void *private)
        case Opt_rasize:
                if (intval < 0)
                        return -EINVAL;
-               fsopt->rasize = ALIGN(intval + PAGE_SIZE - 1, PAGE_SIZE);
+               fsopt->rasize = ALIGN(intval, PAGE_SIZE);
                break;
        case Opt_caps_wanted_delay_min:
                if (intval < 1)