Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 796d6955 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: only set num_pages in calc_layout



Setting it elsewhere is unnecessary and more fragile.

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 37151668
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1276,8 +1276,6 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc,

	/* it may be a short read due to an object boundary */
	req->r_pages = pages;
	num_pages = calc_pages_for(off, *plen);
	req->r_num_pages = num_pages;

	dout("readpages  final extent is %llu~%llu (%d pages)\n",
	     off, *plen, req->r_num_pages);
@@ -1319,7 +1317,6 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino,

	/* it may be a short write due to an object boundary */
	req->r_pages = pages;
	req->r_num_pages = calc_pages_for(off, len);
	dout("writepages %llu~%llu (%d pages)\n", off, len,
	     req->r_num_pages);