qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v2 1/9] block: use public bdrv_is_allocated() interface
Date: Mon, 14 Nov 2011 12:44:18 +0000	[thread overview]
Message-ID: <1321274666-14041-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1321274666-14041-1-git-send-email-stefanha@linux.vnet.ibm.com>

There is no need for bdrv_commit() to use the BlockDriver
.bdrv_is_allocated() interface directly.  Converting to the public
interface gives us the freedom to drop .bdrv_is_allocated() entirely in
favor of a new .bdrv_co_is_allocated() in the future.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 block.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block.c b/block.c
index d565cde..ab68e53 100644
--- a/block.c
+++ b/block.c
@@ -1013,7 +1013,7 @@ int bdrv_commit(BlockDriverState *bs)
     buf = g_malloc(COMMIT_BUF_SECTORS * BDRV_SECTOR_SIZE);
 
     for (sector = 0; sector < total_sectors; sector += n) {
-        if (drv->bdrv_is_allocated(bs, sector, COMMIT_BUF_SECTORS, &n)) {
+        if (bdrv_is_allocated(bs, sector, COMMIT_BUF_SECTORS, &n)) {
 
             if (bdrv_read(bs, sector, buf, n) != 0) {
                 ret = -EIO;
-- 
1.7.7.1

  reply	other threads:[~2011-11-14 12:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 12:44 [Qemu-devel] [PATCH v2 0/9] block: replace .bdrv_is_allocated() with .bdrv_co_is_allocated() Stefan Hajnoczi
2011-11-14 12:44 ` Stefan Hajnoczi [this message]
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 2/9] block: add .bdrv_co_is_allocated() Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 3/9] qed: convert to .bdrv_co_is_allocated() Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 4/9] block: convert qcow2, qcow2, and vmdk " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 5/9] vvfat: convert " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 6/9] vdi: " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 7/9] cow: " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 8/9] block: drop .bdrv_is_allocated() interface Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 9/9] block: add bdrv_co_is_allocated() interface Stefan Hajnoczi
2011-11-23 14:22 ` [Qemu-devel] [PATCH v2 0/9] block: replace .bdrv_is_allocated() with .bdrv_co_is_allocated() Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321274666-14041-2-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).