is_readable() may need to adjust the write_pos backward, but will return
false. If we are at the end we still need to wake up any waiters so they
know about it.
Signed-off-by: Sage Weil <sage@newdream.net>
<< ", read pointers " << read_pos << "/" << received_pos << "/" << requested_pos
<< dendl;
- if (is_readable()) { // NOTE: this check may read more
+ if (is_readable() || read_pos == write_pos) { // NOTE: this check may read more
// readable!
dout(10) << "_finish_read now readable" << dendl;
if (on_readable) {