If some erasures remain ( say 3 ) when the function returns ( because it was not part of want_to_read ), the decoded map will point to a buffer with garbage and the caller will have no way to know about it. This should be fixed as part of http://tracker.ceph.com/issues/6586 and I'm not sure it's worth changing your code as a result. But it's worth mentioning I think ;-)