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

Commit 5600f5eb authored by Sage Weil's avatar Sage Weil
Browse files

ceph: correct comment to match striping calculation



The object extent offset is the file offset _modulo_ the stripe unit.
The code was correct, the comment was wrong.

Reported-by: default avatarNoah Watkins <jayhawk@soe.ucsc.edu>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 35e054a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ void ceph_calc_file_object_mapping(struct ceph_file_layout *layout,

	*bno = objsetno * sc + stripepos;
	dout("objset %u * sc %u = bno %u\n", objsetno, sc, (unsigned)*bno);
	/* *oxoff = *off / layout->fl_stripe_unit; */
	/* *oxoff = *off % layout->fl_stripe_unit; */
	t = off;
	*oxoff = do_div(t, su);
	*oxlen = min_t(u64, *plen, su - *oxoff);