diff options
author | Eric Blake <eblake@redhat.com> | 2016-07-15 17:22:51 -0600 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-07-20 14:11:55 +0100 |
commit | 0c51a893b643bc9393c685b47b9cea1e6831565f (patch) | |
tree | 9636a6178fd16b1efadc97009c5b600a5d589303 /include/block/block.h | |
parent | 9f1963b3f72521f75a549f8afd61b19e7da63c6f (diff) | |
download | qemu-0c51a893b643bc9393c685b47b9cea1e6831565f.tar.gz qemu-0c51a893b643bc9393c685b47b9cea1e6831565f.tar.bz2 qemu-0c51a893b643bc9393c685b47b9cea1e6831565f.zip |
block: Convert bdrv_discard() to byte-based
Another step towards byte-based interfaces everywhere. Replace
the sector-based bdrv_discard() with a new byte-based
bdrv_pdiscard(), which silently ignores any unaligned head
or tail.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1468624988-423-3-git-send-email-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 4f5cebf15f..94cabbb685 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -341,7 +341,7 @@ void bdrv_drain(BlockDriverState *bs); void coroutine_fn bdrv_co_drain(BlockDriverState *bs); void bdrv_drain_all(void); -int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors); +int bdrv_pdiscard(BlockDriverState *bs, int64_t offset, int count); int bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset, int count); int bdrv_has_zero_init_1(BlockDriverState *bs); int bdrv_has_zero_init(BlockDriverState *bs); |