block: Use common req handling for discard
commit00695c27a00a4b3333604aeac50c43269cc151a3
authorFam Zheng <famz@redhat.com>
Tue, 10 Jul 2018 06:31:21 +0000 (10 14:31 +0800)
committerKevin Wolf <kwolf@redhat.com>
Tue, 10 Jul 2018 14:46:16 +0000 (10 16:46 +0200)
treec8bec130f594734d8a8cd791874c873d7560fec0
parent7f8f03ef6d5c82fee1c22be06fc9de4a16ad7059
block: Use common req handling for discard

Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation
here is that discard requests don't affect bs->wr_highest_offset, and it
cannot extend the image.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c