From: Chengguang Xu Date: Wed, 30 May 2018 02:13:11 +0000 (+0800) Subject: ceph: fix alignment of rasize X-Git-Tag: v4.17.12~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=026a8e91bfbd4e28f192038e08e022d2d40f3f2a;p=thirdparty%2Fkernel%2Fstable.git ceph: fix alignment of rasize [ 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 Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ceph/super.c b/fs/ceph/super.c index b33082e6878f1..465861959a6b9 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -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)