Project

General

Profile

Actions

Bug #3619

closed

librbd: read_iterate sparse behavior broken

Added by Sage Weil over 11 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Instead of getting a NULL for a hole, we get a zeroed buffer.

Reported on the ML

Actions #1

Updated by Sage Weil over 11 years ago

  • Status changed from 12 to In Progress
  • Assignee set to Dan Mick
Actions #2

Updated by Dan Mick over 11 years ago

Mitigated somewhat by sparsification efforts in rbd import/export, but still librbd
should be fixed.

Actions #3

Updated by Dan Mick about 11 years ago

  • Assignee changed from Dan Mick to Josh Durgin
Actions #4

Updated by Josh Durgin about 11 years ago

  • Status changed from In Progress to 12
Actions #5

Updated by Sage Weil about 11 years ago

  • Assignee deleted (Josh Durgin)
Actions #6

Updated by Sage Weil over 10 years ago

  • Status changed from 12 to Resolved
Actions #7

Updated by John Mulligan over 2 years ago

FWIW I just ran into this while working on Go bindings for this API as part of the go-ceph project. Based on the API docs I started writing my unit tests that assumed my sparse rbd would return nulls, but it did not.

I'm no expert but it appears an older version of the code apparently explicitly returned NULL but that got changed as part of a refacor:
https://github.com/ceph/ceph/commit/c6bc3e10309a2255a1903a88bf3e650b9962c231

We have users of go-ceph wanting to detect "holes" in the rbd image as they copy the data (in order to make backups IIUC). Unfortunately, it doesn't appear this api will help them due to this issue.

Actions #8

Updated by John Mulligan over 2 years ago

To clarify: I was working on wrapping read_iterate2 not read_iterate (which is deprecated) but they're largely the same implementation AFAIK.

Actions

Also available in: Atom PDF