rbd: add discard support
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 1 May 2012 06:16:45 +0000 (23:16 -0700)
committerKevin Wolf <kwolf@redhat.com>
Wed, 2 May 2012 16:41:42 +0000 (18:41 +0200)
commit787f31330eb51ef7621d7c316b90262c7bb5d6d3
treea1e2f657dfafcfbd1e6fe8fde1ccbb8c95d14dec
parent647cc472232608f268fe48da78bea81e6d01b1ea
rbd: add discard support

Change the write flag to an operation type in RBDAIOCB, and make the
buffer optional since discard doesn't use it.

Discard is first included in librbd 0.1.2 (which is in Ceph 0.46).
If librbd is too old, leave out qemu_rbd_aio_discard entirely,
so the old behavior is preserved.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/rbd.c