@@ -75,7 +75,7 @@ void disk_image__close(struct disk_image *disk)
}
/* Fill iov with disk data, starting from sector 'sector'. Return amount of bytes read. */
-ssize_t disk_image__read_sector_iov(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount)
+ssize_t disk_image__read(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount)
{
u64 first_sector = sector;
@@ -94,7 +94,7 @@ ssize_t disk_image__read_sector_iov(struct disk_image *disk, u64 sector, const s
}
/* Write iov to disk, starting from sector 'sector'. Return amount of bytes written. */
-ssize_t disk_image__write_sector_iov(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount)
+ssize_t disk_image__write(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount)
{
u64 first_sector = sector;
@@ -54,8 +54,8 @@ static inline int disk_image__write_sector(struct disk_image *disk, u64 sector,
return disk->ops->write_sector(disk, sector, src, src_len);
}
-ssize_t disk_image__read_sector_iov(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount);
-ssize_t disk_image__write_sector_iov(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount);
+ssize_t disk_image__read(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount);
+ssize_t disk_image__write(struct disk_image *disk, u64 sector, const struct iovec *iov, int iovcount);
static inline int disk_image__flush(struct disk_image *disk)
{
@@ -140,10 +140,10 @@ static bool virtio_blk_do_io_request(struct kvm *kvm,
switch (req->type) {
case VIRTIO_BLK_T_IN:
- block_cnt = disk_image__read_sector_iov(bdev->disk, req->sector, iov + 1, in + out - 2);
+ block_cnt = disk_image__read(bdev->disk, req->sector, iov + 1, in + out - 2);
break;
case VIRTIO_BLK_T_OUT:
- block_cnt = disk_image__write_sector_iov(bdev->disk, req->sector, iov + 1, in + out - 2);
+ block_cnt = disk_image__write(bdev->disk, req->sector, iov + 1, in + out - 2);
break;
case VIRTIO_BLK_T_FLUSH:
block_cnt = disk_image__flush(bdev->disk);
This patch renames disk_image__{read, write}_sector_io to disk_image__{read, write}. Signed-off-by: Asias He <asias.hejun@gmail.com> --- tools/kvm/disk/core.c | 4 ++-- tools/kvm/include/kvm/disk-image.h | 4 ++-- tools/kvm/virtio/blk.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)