Skip to content

Commit

Permalink
ceph: correct comment to match striping calculation
Browse files Browse the repository at this point in the history
The object extent offset is the file offset _modulo_ the stripe unit.
The code was correct, the comment was wrong.

Reported-by: Noah Watkins <jayhawk@soe.ucsc.edu>
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Oct 29, 2009
1 parent 35e054a commit 5600f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5600f5e

Please sign in to comment.