Răsfoiți Sursa

ceph: fix alignment of rasize

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>
Chengguang Xu 7 ani în urmă
părinte
comite
c36ed50de2
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      fs/ceph/super.c

+ 1 - 1
fs/ceph/super.c

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