libceph: verify requests queued in order

Add checking to verify all osd requests for an osd are added to the
queue in order of increasing tid.

Signed-off-by: Alex Elder <elder@inktank.com>
rbd: add rbd_obj_request_print()

Add a function that pretty-prints an object request.

Signed-off-by: Alex Elder <elder@inktank.com>
rbd: print something when errors occur

Print information about errors when they occur, to help find out
where the source of EIO errors for xfstests test 259.
    http://tracker.ceph.com/issues/4242

Signed-off-by: Alex Elder <elder@inktank.com>
loop: print more error info with write errors

Include the result returned by the underlying file's write method if
it differs from the number of bytes requested in the message printed
in __do_lo_send_write().

Similarly, include the value returned by lo_do_transfer() in
do_lo_send_write() in the message printed if it's non-zero.

Signed-off-by: Alex Elder <elder@inktank.com>
rbd: add rbd_img_request_print()

Add a function that pretty-prints an image request.

Signed-off-by: Alex Elder <elder@inktank.com>
rbd: look for the magic short request

Test 259 is reporting this:
    loop: Write error (2048) at byte offset 2199538393088, length 4096.
Look for image requests with that start offset and print them
when they arrive.  We want to see where the length is getting
truncated from 4096 to 2048.

Here's another instance, so look for that too:
    loop: Write error (2048) at byte offset 2199533527040, length 4096.

Signed-off-by: Alex Elder <elder@inktank.com>