diff options
author | Sage Weil <sage@newdream.net> | 2009-10-28 17:57:25 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-10-28 20:45:37 -0400 |
commit | 5600f5ebd318f7af6f4b19a29f08d18bb85264e5 (patch) | |
tree | dacf9f162b079f5978446cdd7461a83edf41ef3b /fs/ceph/osdmap.c | |
parent | 35e054a66e07f508aa7cfabc7db1757379093689 (diff) |
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>
Diffstat (limited to 'fs/ceph/osdmap.c')
-rw-r--r-- | fs/ceph/osdmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index 60012e05bdfd..a9a4143234fa 100644 --- a/fs/ceph/osdmap.c +++ b/fs/ceph/osdmap.c | |||
@@ -752,7 +752,7 @@ void ceph_calc_file_object_mapping(struct ceph_file_layout *layout, | |||
752 | 752 | ||
753 | *bno = objsetno * sc + stripepos; | 753 | *bno = objsetno * sc + stripepos; |
754 | dout("objset %u * sc %u = bno %u\n", objsetno, sc, (unsigned)*bno); | 754 | dout("objset %u * sc %u = bno %u\n", objsetno, sc, (unsigned)*bno); |
755 | /* *oxoff = *off / layout->fl_stripe_unit; */ | 755 | /* *oxoff = *off % layout->fl_stripe_unit; */ |
756 | t = off; | 756 | t = off; |
757 | *oxoff = do_div(t, su); | 757 | *oxoff = do_div(t, su); |
758 | *oxlen = min_t(u64, *plen, su - *oxoff); | 758 | *oxlen = min_t(u64, *plen, su - *oxoff); |