qemu/include
Eric Blake 9f1963b3f7 block: Convert bdrv_co_discard() to byte-based
Another step towards byte-based interfaces everywhere.  Replace
the sector-based bdrv_co_discard() with a new byte-based
bdrv_co_pdiscard(), which silently ignores any unaligned head
or tail.  Driver callbacks will be converted in followup patches.

By calculating the alignment outside of the loop, and clamping
the max discard to an aligned value, we can simplify the actions
done within the loop.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1468624988-423-2-git-send-email-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-07-20 14:11:54 +01:00
..
block block: Convert bdrv_co_discard() to byte-based 2016-07-20 14:11:54 +01:00
crypto Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
disas disas: Fix ATTRIBUTE_UNUSED define clash with ALSA headers 2016-07-19 16:40:39 +01:00
exec Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
fpu Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hw target-arm queue: 2016-07-14 17:32:53 +01:00
io Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
monitor Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
net Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
qapi blockjob: Update description of the 'id' field 2016-07-13 13:26:02 +02:00
qemu compiler: never omit assertions if using a static analysis tool 2016-07-17 09:59:21 +02:00
qom trace: Add per-vCPU tracing states for events with the 'vcpu' property 2016-07-18 18:23:12 +01:00
standard-headers linux-headers: update 2016-06-14 13:34:50 +02:00
sysemu * SCSI scanner support 2016-07-14 13:44:06 +01:00
ui gtk: fix build 2016-07-11 10:40:29 +01:00
elf.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
glib-compat.h vhost-user-test: fix g_cond_wait_until compat implementation 2016-06-29 16:49:40 +02:00
qemu-common.h qemu-common.h: Drop WORDS_ALIGNED define 2016-06-07 18:19:24 +03:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
trace-tcg.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
trace.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00