Project

General

Profile

Backport #16546

Updated by Nathan Cutler over 7 years ago

In ObjectCacher::bh_read_finish, we have a nonsense snippet
<pre>
} else {
bh->bl.substr_of(bl,
oldpos-bh->start(),
bh->length());
mark_clean(bh);
}
</pre>
Here we're *trying* to map the offsets of an incoming OSD op reply's bufferlist with our BufferHeads. But oldpos==bh->start at all times. The correct offset calculation is "bh->start()-start" ("start" being a function parameter corresponding to bl's position within the object).

The patch is obviously simple enough, but I want tests verifying it as well.

Back