Skip to content

Commit

Permalink
rgw: fix stripe_size calculation
Browse files Browse the repository at this point in the history
Fixes: ceph#8299
Backport: firefly
The stripe size calculation was broken, specifically affected cases
where we had manifest that described multiple parts.

Signed-off-by: Yehuda Sadeh <[email protected]>
  • Loading branch information
yehudasa committed May 6, 2014
1 parent 650051c commit 9968b93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rgw/rgw_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ void RGWObjManifest::obj_iterator::seek(uint64_t o)
stripe_size = rule.stripe_max_size;
stripe_size = MIN(manifest->get_obj_size() - stripe_ofs, stripe_size);
} else {
stripe_size = rule.part_size - (ofs - stripe_ofs);
stripe_size = MIN(stripe_size, rule.stripe_max_size);
uint64_t next = MIN(stripe_ofs + rule.stripe_max_size, part_ofs + rule.part_size);
stripe_size = next - stripe_ofs;
}

update_location();
Expand Down

0 comments on commit 9968b93

Please sign in to comment.