diff mbox

[PULL,08/18] block/gluster: drop qemu_gluster_aio_flush_cb()

Message ID 20130817052234.GF4126@in.ibm.com
State New
Headers show

Commit Message

Bharata B Rao Aug. 17, 2013, 5:22 a.m. UTC
> From: Stefan Hajnoczi <stefanha@redhat.com>
> Since .io_flush() is no longer called we do not need
> qemu_gluster_aio_flush_cb() anymore.  It turns out that qemu_aio_count
> is unused now and can be dropped.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Tested-by: Bharata B Rao <bharata@linux.vnet.ibm.com>

Tested GlusterFS backend, but it needed the below fix:
------

gluster: Remove the use of qemu_aio_count from gluster discard

qemu_aio_count is no longer used and hence remove its usage from
qemu_gluster_aio_discard()

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
 block/gluster.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Stefan Hajnoczi Aug. 19, 2013, 1:28 p.m. UTC | #1
On Sat, Aug 17, 2013 at 10:52:34AM +0530, Bharata B Rao wrote:
> > From: Stefan Hajnoczi <stefanha@redhat.com>
> > Since .io_flush() is no longer called we do not need
> > qemu_gluster_aio_flush_cb() anymore.  It turns out that qemu_aio_count
> > is unused now and can be dropped.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> Tested-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> 
> Tested GlusterFS backend, but it needed the below fix:
> ------

Thanks, I have fixed my development machine so block/gluster.c is always
built.

Since this pull request hasn't been merged yet I am resending with your
fix squashed in.

Stefan
diff mbox

Patch

diff --git a/block/gluster.c b/block/gluster.c
index fbdbe97..46f36f8 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -548,7 +548,6 @@  static BlockDriverAIOCB *qemu_gluster_aio_discard(BlockDriverState *bs,
     acb->size = 0;
     acb->ret = 0;
     acb->finished = NULL;
-    s->qemu_aio_count++;
 
     ret = glfs_discard_async(s->fd, offset, size, &gluster_finish_aiocb, acb);
     if (ret < 0) {
@@ -557,7 +556,6 @@  static BlockDriverAIOCB *qemu_gluster_aio_discard(BlockDriverState *bs,
     return &acb->common;
 
 out:
-    s->qemu_aio_count--;
     qemu_aio_release(acb);
     return NULL;
 }