Project

General

Profile

Bug #12775

common: do not insert emtpy ptr when rebuild emtpy bufferlist

Added by Xinze Chi almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
Start date:
08/25/2015
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:

Description

when bufferlist len is 0, rebuild would new a prt with len 0 and insert into bufferlist.

The follow test case would assert.

bufferlist bl;
char t1[] = "X";
bufferlist a2;
a2.append(t1, 1);
bl.rebuild(); // this would insert new ptr with len 0
bl.append(a2);
bufferlist::iterator p = bl.begin();
char dst1;
p.copy(1, dst); // assert


Related issues

Copied to Ceph - Backport #12847: common: do not insert emtpy ptr when rebuild emtpy bufferlist Resolved 08/25/2015

Associated revisions

Revision fb1b6ddd (diff)
Added by Xinze Chi almost 3 years ago

common: fix insert empty ptr when bufferlist rebuild

Fixes: #12775
Signed-off-by: Xinze Chi <>

Revision 2b0b7ae6 (diff)
Added by Xinze Chi almost 3 years ago

common: fix insert empty ptr when bufferlist rebuild

Fixes: #12775
Signed-off-by: Xinze Chi <>
(cherry picked from commit fb1b6ddd7bfe40d4a38d5ec59b1c3f59f2a83f23)

Conflicts:
src/common/buffer.cc : because invalidate_crc did not exist
in hammer

History

#1 Updated by Xinze Chi almost 3 years ago

#2 Updated by Sage Weil almost 3 years ago

  • Status changed from New to Need Review

#3 Updated by Sage Weil almost 3 years ago

  • Status changed from Need Review to Testing

#4 Updated by Sage Weil almost 3 years ago

  • Status changed from Testing to Pending Backport
  • Source changed from other to Community (dev)
  • Backport set to hammer

#5 Updated by Loic Dachary almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF