[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/17] blkreplay: Switch .bdrv_co_discard() to byte-
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH 10/17] blkreplay: Switch .bdrv_co_discard() to byte-based |
Date: |
Wed, 22 Jun 2016 09:51:07 -0600 |
Another step towards killing off sector-based block APIs.
Signed-off-by: Eric Blake <address@hidden>
---
block/blkreplay.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/block/blkreplay.c b/block/blkreplay.c
index 28024c8..b06e3a0 100755
--- a/block/blkreplay.c
+++ b/block/blkreplay.c
@@ -114,12 +114,11 @@ static int coroutine_fn
blkreplay_co_pwrite_zeroes(BlockDriverState *bs,
return ret;
}
-static int coroutine_fn blkreplay_co_discard(BlockDriverState *bs,
- int64_t sector_num, int nb_sectors)
+static int coroutine_fn blkreplay_co_pdiscard(BlockDriverState *bs,
+ int64_t offset, int count)
{
uint64_t reqid = request_id++;
- int ret = bdrv_co_pdiscard(bs->file->bs, sector_num << BDRV_SECTOR_BITS,
- nb_sectors << BDRV_SECTOR_BITS);
+ int ret = bdrv_co_pdiscard(bs->file->bs, offset, count);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_yield();
@@ -149,7 +148,7 @@ static BlockDriver bdrv_blkreplay = {
.bdrv_co_writev = blkreplay_co_writev,
.bdrv_co_pwrite_zeroes = blkreplay_co_pwrite_zeroes,
- .bdrv_co_discard = blkreplay_co_discard,
+ .bdrv_co_pdiscard = blkreplay_co_pdiscard,
.bdrv_co_flush = blkreplay_co_flush,
};
--
2.5.5
- [Qemu-devel] [PATCH 00/17] byte-based block discard, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 09/17] block: Add .bdrv_co_pdiscard() driver callback, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 07/17] rbd: Switch rbd_start_aio() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 10/17] blkreplay: Switch .bdrv_co_discard() to byte-based,
Eric Blake <=
- [Qemu-devel] [PATCH 04/17] block: Convert bdrv_aio_discard() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 08/17] block: Convert .bdrv_aio_discard() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 12/17] iscsi: Switch .bdrv_co_discard() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 02/17] block: Convert bdrv_discard() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 05/17] block: Convert BB interface to byte-based discards, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 03/17] block: Switch BlockRequest to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 01/17] block: Convert bdrv_co_discard() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 06/17] raw-posix: Switch paio_submit() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 13/17] nbd: Switch .bdrv_co_discard() to byte-based, Eric Blake, 2016/06/22
- [Qemu-devel] [PATCH 15/17] raw_bsd: Switch .bdrv_co_discard() to byte-based, Eric Blake, 2016/06/22