]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ceph: fix alignment of rasize
authorChengguang Xu <cgxu519@gmx.com>
Wed, 30 May 2018 02:13:11 +0000 (10:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:47:36 +0000 (07:47 +0200)
[ Upstream commit c36ed50de2ad1649ce0369a4a6fc2cc11b20dfb7 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/super.c

index b33082e6878f1ca1ba8820716dafb1924d77855d..465861959a6b9ea89807594ccee9bf7900a8e850 100644 (file)
@@ -268,7 +268,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)