Skip to content

Commit

Permalink
Stripper: Fix incorrect push_front -> append_zero change
Browse files Browse the repository at this point in the history
Signed-off-by: Haomai Wang <haomai@xsky.com>
  • Loading branch information
yuyuyu101 committed Feb 9, 2016
1 parent 7731ae9 commit 12ea474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/osdc/Striper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ void Striper::StripedReadResult::assemble_result(CephContext *cct,
size_t len = p->second.first.length();
if (len < p->second.second) {
if (zero_tail || bl.length()) {
bl.append_zero(p->second.second - len);
bufferptr bp(p->second.second - len);
bp.zero();
bl.push_front(std::move(bp));
bl.claim_prepend(p->second.first);
} else {
bl.claim_prepend(p->second.first);
Expand Down

0 comments on commit 12ea474

Please sign in to comment.