Bug #3619
closedlibrbd: read_iterate sparse behavior broken
0%
Description
Instead of getting a NULL for a hole, we get a zeroed buffer.
Reported on the ML
Updated by Sage Weil over 11 years ago
- Status changed from 12 to In Progress
- Assignee set to Dan Mick
Updated by Dan Mick over 11 years ago
Mitigated somewhat by sparsification efforts in rbd import/export, but still librbd
should be fixed.
Updated by Dan Mick about 11 years ago
- Assignee changed from Dan Mick to Josh Durgin
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.
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.