Project

General

Profile

Backport #16546

hammer: ObjectCacher doesn't correctly handle read replies on split BufferHeads

Added by Xiaoxi Chen over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Target version:
Release:
hammer
Crash signature (v1):
Crash signature (v2):


Related issues

Duplicated by Ceph - Bug #17545: Data corruption using RBD with caching enabled Duplicate 10/10/2016
Copied from Ceph - Bug #16002: ObjctCacher: doesn't correctly handle read replies on split BufferHeads Resolved 05/23/2016

History

#1 Updated by Xiaoxi Chen over 6 years ago

  • Copied from Bug #16002: ObjctCacher: doesn't correctly handle read replies on split BufferHeads added

#2 Updated by Nathan Cutler over 6 years ago

  • Tracker changed from Bug to Backport
  • Description updated (diff)
  • Status changed from Pending Backport to New

original description

In ObjectCacher::bh_read_finish, we have a nonsense snippet

      } else {
        bh->bl.substr_of(bl,
                         oldpos-bh->start(),
                         bh->length());
        mark_clean(bh);
      }

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.

#3 Updated by Greg Farnum over 6 years ago

  • Assignee deleted (Greg Farnum)
  • Priority changed from Normal to High

#4 Updated by Greg Farnum over 6 years ago

  • Duplicated by Bug #17545: Data corruption using RBD with caching enabled added

#5 Updated by Nathan Cutler over 6 years ago

  • Subject changed from hammer: ObjctCacher: doesn't correctly handle read replies on split BufferHeads to hammer: ObjectCacher doesn't correctly handle read replies on split BufferHeads

#6 Updated by Nathan Cutler over 6 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to Nathan Cutler

#7 Updated by Nathan Cutler over 6 years ago

  • Description updated (diff)
  • Assignee changed from Nathan Cutler to Alexey Sheplyakov

#8 Updated by Nathan Cutler about 6 years ago

  • Status changed from In Progress to Resolved
  • Target version set to v0.94.10

Also available in: Atom PDF