diff options
| author | Eric Blake | 2016-07-16 01:22:58 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2016-07-20 15:11:55 +0200 |
| commit | 47a5486d598e0cfef6c87c5f44b85955a5f2c4ff (patch) | |
| tree | f9829a55d7484cd58245d34d2cab210d27a9df1b /include | |
| parent | block: Convert .bdrv_aio_discard() to byte-based (diff) | |
| download | qemu-47a5486d598e0cfef6c87c5f44b85955a5f2c4ff.tar.gz qemu-47a5486d598e0cfef6c87c5f44b85955a5f2c4ff.tar.xz qemu-47a5486d598e0cfef6c87c5f44b85955a5f2c4ff.zip | |
block: Add .bdrv_co_pdiscard() driver callback
There's enough drivers with a sector-based callback that it will
be easier to switch one at a time. This patch adds a byte-based
callback, and then after all drivers are swapped, we'll drop the
sector-based callback.
[checkpatch doesn't like the space after coroutine_fn in
block_int.h, but it's consistent with the rest of the file]
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1468624988-423-10-git-send-email-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block_int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 9bf9aed83d..8f16d1652e 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -167,6 +167,8 @@ struct BlockDriver { int64_t offset, int count, BdrvRequestFlags flags); int coroutine_fn (*bdrv_co_discard)(BlockDriverState *bs, int64_t sector_num, int nb_sectors); + int coroutine_fn (*bdrv_co_pdiscard)(BlockDriverState *bs, + int64_t offset, int count); int64_t coroutine_fn (*bdrv_co_get_block_status)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file); |
