From patchwork Wed May 18 08:19:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 793042 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4I8O3wj004358 for ; Wed, 18 May 2011 08:24:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755529Ab1ERIWz (ORCPT ); Wed, 18 May 2011 04:22:55 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:60954 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755225Ab1ERIWw (ORCPT ); Wed, 18 May 2011 04:22:52 -0400 Received: by pvg12 with SMTP id 12so602097pvg.19 for ; Wed, 18 May 2011 01:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=BG0aHZ32zXUfPM8hpYoV5mTs+jpLxpibrIhqSKnN920=; b=TZ1NJASC57+Z5Asa4OkKdW9BxN6AfsH1uzMArUA0cGZGUMNd0TPOOpDEWgV3UN/ybF ffPRgN+O4OxWsVHHY1+Z843MjrVnAU9RLncLQGuI3nLJHLm5vlyq51XlHHUXgbNbmkNQ qHnvPqvIdwD6j7rk0CBkKVNVliNy7lNAtg64E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=oE98rfCFI0BkQ6ZC5hP20+g1SiwXSpLOAo/JLeX7T1R0655cWg9iiivQ3BYsYW2OfX GLPVa47XShvkkxgYaIu7b1dd3b6Ev97TFuFdjAuXblQrqN1QJb83tSPEorPZv5HadcN6 V1fcbN6UMsvTdpUBaDyCPaDj499eyy3kpB+cs= Received: by 10.68.19.136 with SMTP id f8mr2660280pbe.173.1305706972302; Wed, 18 May 2011 01:22:52 -0700 (PDT) Received: from localhost.localdomain ([219.224.169.130]) by mx.google.com with ESMTPS id q10sm912018pbk.39.2011.05.18.01.21.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 May 2011 01:22:51 -0700 (PDT) From: Asias He To: Pekka Enberg Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org, Asias He Subject: [PATCH 04/14] kvm tools: Rename disk_image__{read, write}_sector_iov Date: Wed, 18 May 2011 16:19:05 +0800 Message-Id: <1305706755-2816-4-git-send-email-asias.hejun@gmail.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1305706755-2816-1-git-send-email-asias.hejun@gmail.com> References: <1305706755-2816-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 18 May 2011 08:24:05 +0000 (UTC) This patch renames disk_image__{read, write}_sector_io to disk_image__{read, write}. Signed-off-by: Asias He --- 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(-) diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c index 4622e99..3b12fff 100644 --- a/tools/kvm/disk/core.c +++ b/tools/kvm/disk/core.c @@ -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; diff --git a/tools/kvm/include/kvm/disk-image.h b/tools/kvm/include/kvm/disk-image.h index 87bebd3..d43457e 100644 --- a/tools/kvm/include/kvm/disk-image.h +++ b/tools/kvm/include/kvm/disk-image.h @@ -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) { diff --git a/tools/kvm/virtio/blk.c b/tools/kvm/virtio/blk.c index c9b8a54..de88fe9 100644 --- a/tools/kvm/virtio/blk.c +++ b/tools/kvm/virtio/blk.c @@ -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);