[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v3 22/44] block: Kill blk_write(), blk_read()
From: |
Eric Blake |
Subject: |
[Qemu-block] [PATCH v3 22/44] block: Kill blk_write(), blk_read() |
Date: |
Fri, 22 Apr 2016 17:40:30 -0600 |
Now that there are no remaining clients, we can drop these
functions, to ensure that all future users get the byte-based
interfaces. Sadly, there are still remaining sector-based
interfaces, such as blk_aio_writev; those will have to wait
for another day.
Signed-off-by: Eric Blake <address@hidden>
---
include/sysemu/block-backend.h | 4 ----
block/block-backend.c | 25 -------------------------
2 files changed, 29 deletions(-)
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 1246699..bf04086 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -90,12 +90,8 @@ void blk_attach_dev_nofail(BlockBackend *blk, void *dev);
void blk_detach_dev(BlockBackend *blk, void *dev);
void *blk_get_attached_dev(BlockBackend *blk);
void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque);
-int blk_read(BlockBackend *blk, int64_t sector_num, uint8_t *buf,
- int nb_sectors);
int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
int count);
-int blk_write(BlockBackend *blk, int64_t sector_num, const uint8_t *buf,
- int nb_sectors);
int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset,
int count, BdrvRequestFlags flags);
BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
diff --git a/block/block-backend.c b/block/block-backend.c
index ae08bd2..1c3b495 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -772,24 +772,6 @@ static int blk_prw(BlockBackend *blk, int64_t offset,
uint8_t *buf,
return rwco.ret;
}
-static int blk_rw(BlockBackend *blk, int64_t sector_num, uint8_t *buf,
- int nb_sectors, CoroutineEntry co_entry,
- BdrvRequestFlags flags)
-{
- if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {
- return -EINVAL;
- }
-
- return blk_prw(blk, sector_num << BDRV_SECTOR_BITS, buf,
- nb_sectors << BDRV_SECTOR_BITS, co_entry, flags);
-}
-
-int blk_read(BlockBackend *blk, int64_t sector_num, uint8_t *buf,
- int nb_sectors)
-{
- return blk_rw(blk, sector_num, buf, nb_sectors, blk_read_entry, 0);
-}
-
int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
int count)
{
@@ -809,13 +791,6 @@ int blk_pread_unthrottled(BlockBackend *blk, int64_t
offset, uint8_t *buf,
return ret;
}
-int blk_write(BlockBackend *blk, int64_t sector_num, const uint8_t *buf,
- int nb_sectors)
-{
- return blk_rw(blk, sector_num, (uint8_t*) buf, nb_sectors,
- blk_write_entry, 0);
-}
-
int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset,
int count, BdrvRequestFlags flags)
{
--
2.5.5
- [Qemu-block] [PATCH v3 16/44] atapi: Switch to byte-based block access, (continued)
- [Qemu-block] [PATCH v3 16/44] atapi: Switch to byte-based block access, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 11/44] nand: Switch to byte-based block access, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 15/44] m25p80: Switch to byte-based block access, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 18/44] qemu-img: Switch to byte-based block access, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 23/44] qemu-io: Add missing option documentation, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 20/44] block: Switch blk_read_unthrottled() to byte interface, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 24/44] qemu-io: Add 'write -f' to test FUA flag, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 19/44] qemu-io: Switch to byte-based block access, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 25/44] qemu-io: Add 'open -u' to set BDRV_O_UNMAP after the fact, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 22/44] block: Kill blk_write(), blk_read(),
Eric Blake <=
- [Qemu-block] [PATCH v3 21/44] block: Switch blk_write_zeroes() to byte interface, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 28/44] nbd: Detect servers that send unexpected error values, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 27/44] nbd: Use BDRV_REQ_FUA for better FUA where supported, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 26/44] qemu-io: Add 'write -z -u' to test MAY_UNMAP flag, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 31/44] nbd: Share common reply-sending code in server, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 33/44] nbd: Let client skip portions of server reply, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 35/44] nbd: Support shorter handshake, Eric Blake, 2016/04/22
- [Qemu-block] [PATCH v3 30/44] nbd: Treat flags vs. command type as separate fields, Eric Blake, 2016/04/22