[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/8] block: Removed unused sector-based vectored I/O
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH 8/8] block: Removed unused sector-based vectored I/O |
Date: |
Wed, 25 Apr 2018 13:32:23 -0500 |
We are gradually moving away from sector-based interfaces, towards
byte-based. Now that all callers of vectored I/O have been converted
to use our preferred byte-based bdrv_co_p{read,write}v(), we can
delete the unused bdrv_co_{read,write}v().
Furthermore, this gets rid of the signature difference between
the public bdrv_co_writev and the callback .bdrv_co_writev.
Signed-off-by: Eric Blake <address@hidden>
---
include/block/block.h | 4 ----
block/io.c | 36 ------------------------------------
2 files changed, 40 deletions(-)
diff --git a/include/block/block.h b/include/block/block.h
index cdec3639a35..8b191c23d97 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -278,10 +278,6 @@ int bdrv_pwrite(BdrvChild *child, int64_t offset, const
void *buf, int bytes);
int bdrv_pwritev(BdrvChild *child, int64_t offset, QEMUIOVector *qiov);
int bdrv_pwrite_sync(BdrvChild *child, int64_t offset,
const void *buf, int count);
-int coroutine_fn bdrv_co_readv(BdrvChild *child, int64_t sector_num,
- int nb_sectors, QEMUIOVector *qiov);
-int coroutine_fn bdrv_co_writev(BdrvChild *child, int64_t sector_num,
- int nb_sectors, QEMUIOVector *qiov);
/*
* Efficiently zero a region of the disk image. Note that this is a regular
* I/O request like read or write and should have a reasonable size. This
diff --git a/block/io.c b/block/io.c
index 4fad5ac2fef..7155786eb47 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1339,24 +1339,6 @@ int coroutine_fn bdrv_co_preadv(BdrvChild *child,
return ret;
}
-static int coroutine_fn bdrv_co_do_readv(BdrvChild *child,
- int64_t sector_num, int nb_sectors, QEMUIOVector *qiov,
- BdrvRequestFlags flags)
-{
- if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {
- return -EINVAL;
- }
-
- return bdrv_co_preadv(child, sector_num << BDRV_SECTOR_BITS,
- nb_sectors << BDRV_SECTOR_BITS, qiov, flags);
-}
-
-int coroutine_fn bdrv_co_readv(BdrvChild *child, int64_t sector_num,
- int nb_sectors, QEMUIOVector *qiov)
-{
- return bdrv_co_do_readv(child, sector_num, nb_sectors, qiov, 0);
-}
-
static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
int64_t offset, int bytes, BdrvRequestFlags flags)
{
@@ -1795,24 +1777,6 @@ out:
return ret;
}
-static int coroutine_fn bdrv_co_do_writev(BdrvChild *child,
- int64_t sector_num, int nb_sectors, QEMUIOVector *qiov,
- BdrvRequestFlags flags)
-{
- if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {
- return -EINVAL;
- }
-
- return bdrv_co_pwritev(child, sector_num << BDRV_SECTOR_BITS,
- nb_sectors << BDRV_SECTOR_BITS, qiov, flags);
-}
-
-int coroutine_fn bdrv_co_writev(BdrvChild *child, int64_t sector_num,
- int nb_sectors, QEMUIOVector *qiov)
-{
- return bdrv_co_do_writev(child, sector_num, nb_sectors, qiov, 0);
-}
-
int coroutine_fn bdrv_co_pwrite_zeroes(BdrvChild *child, int64_t offset,
int bytes, BdrvRequestFlags flags)
{
--
2.14.3
- [Qemu-devel] [PATCH 0/8] block: more byte-based cleanups: vectored I/O, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 0/8] block: more byte-based cleanups: vectored I/O, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 6/8] replication: Switch to byte-based calls, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 2/8] qcow: Switch get_cluster_offset to be byte-based, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 4/8] qcow: Switch qcow_co_writev to byte-based calls, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 3/8] qcow: Switch qcow_co_readv to byte-based calls, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 1/8] parallels: Switch to byte-based calls, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 5/8] qcow: Switch to a byte-based driver, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 7/8] vhdx: Switch to byte-based calls, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH 8/8] block: Removed unused sector-based vectored I/O,
Eric Blake <=