engines/rbd: use rbd_aio_is_complete() and add TRIM support
authorJens Axboe <axboe@fb.com>
Tue, 28 Oct 2014 15:03:11 +0000 (09:03 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 28 Oct 2014 15:03:11 +0000 (09:03 -0600)
commitdbf388d2f6a76b37176edc2b1b500f1bb2557ca8
treecefd5e041dedfc442f7860c649a5d938325f6209
parent903b2812e9c772d30677b6768e6e00d6d16bc801
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>
engines/rbd.c