read and write to rbd image with librbd