rbd: various fixes and cleanups

- Don't use usleep() when no completions are available, call into
  rbd to wait for one.

- Check for errors on reads/writes/syncs instead of just assuming
  that everything went fine.

- Fix leak of completions when read/write/sync fails.

- Style cleanups, and remove unnecessary casts.

Signed-off-by: Jens Axboe <axboe@fb.com>
1 file changed