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: Noah Watkins <jayhawk@soe.ucsc.edu>
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2009-10-28 14:57:25 -07:00
parent 35e054a66e
commit 5600f5ebd3

View File

@ -752,7 +752,7 @@ void ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
*bno = objsetno * sc + stripepos; *bno = objsetno * sc + stripepos;
dout("objset %u * sc %u = bno %u\n", objsetno, sc, (unsigned)*bno); 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; t = off;
*oxoff = do_div(t, su); *oxoff = do_div(t, su);
*oxlen = min_t(u64, *plen, su - *oxoff); *oxlen = min_t(u64, *plen, su - *oxoff);