engines/rbd: use rbd_aio_is_complete() and add TRIM support

Using fri->io_complete is potentially racy, since we have no
locking around checking and waiting. Use the API provided
function to check for completion instead.

Add support for TRIM through rbd_aio_discard().

Cleanup the queue interface and completion creation.

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