Bug #3619
closed
librbd: read_iterate sparse behavior broken
Added by Sage Weil over 11 years ago.
Updated over 2 years ago.
Description
Instead of getting a NULL for a hole, we get a zeroed buffer.
Reported on the ML
- Status changed from 12 to In Progress
- Assignee set to Dan Mick
Mitigated somewhat by sparsification efforts in rbd import/export, but still librbd
should be fixed.
- Assignee changed from Dan Mick to Josh Durgin
- Status changed from In Progress to 12
- Assignee deleted (
Josh Durgin)
- Status changed from 12 to Resolved
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.
To clarify: I was working on wrapping read_iterate2 not read_iterate (which is deprecated) but they're largely the same implementation AFAIK.
Also available in: Atom
PDF