ceph: correct comment to match striping calculation
authorSage Weil <sage@newdream.net>
Wed, 28 Oct 2009 21:57:25 +0000 (14:57 -0700)
committerSage Weil <sage@newdream.net>
Thu, 29 Oct 2009 00:45:37 +0000 (17:45 -0700)
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>
fs/ceph/osdmap.c

index 60012e05bdfd68aaca9bddc3e9d18622ecc40b3f..a9a4143234faa3fd1ad2f670fc3da29ab6eb8a05 100644 (file)
@@ -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);