Blame SOURCES/kvm-block-rename-bdrv_co_drain-to-bdrv_co_drain_begin.patch

4a2fec
From 5185df6533f3e1f3c428e6d7b11a1fe372d0357b Mon Sep 17 00:00:00 2001
4a2fec
From: Jeffrey Cody <jcody@redhat.com>
4a2fec
Date: Thu, 30 Nov 2017 22:49:06 +0100
4a2fec
Subject: [PATCH 02/21] block: rename bdrv_co_drain to bdrv_co_drain_begin
4a2fec
4a2fec
RH-Author: Jeffrey Cody <jcody@redhat.com>
4a2fec
Message-id: <ec3f5f7be56c7d67bb8e8230d5ef27824ea2bf1f.1511985875.git.jcody@redhat.com>
4a2fec
Patchwork-id: 78039
4a2fec
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 02/11] block: rename bdrv_co_drain to bdrv_co_drain_begin
4a2fec
Bugzilla: 1506531
4a2fec
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
4a2fec
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
4a2fec
RH-Acked-by: John Snow <jsnow@redhat.com>
4a2fec
4a2fec
From: Manos Pitsidianakis <el13635@mail.ntua.gr>
4a2fec
4a2fec
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
4a2fec
Reviewed-by: Fam Zheng <famz@redhat.com>
4a2fec
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
4a2fec
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
4a2fec
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4a2fec
(cherry picked from commit f8ea8dacf0de636e2c0f13b90c0d75db97dc9b44)
4a2fec
Signed-off-by: Jeff Cody <jcody@redhat.com>
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 block/io.c                | 4 ++--
4a2fec
 block/qed.c               | 6 +++---
4a2fec
 include/block/block_int.h | 4 ++--
4a2fec
 3 files changed, 7 insertions(+), 7 deletions(-)
4a2fec
4a2fec
diff --git a/block/io.c b/block/io.c
4a2fec
index 93fb802..3a717bc 100644
4a2fec
--- a/block/io.c
4a2fec
+++ b/block/io.c
4a2fec
@@ -162,7 +162,7 @@ static void coroutine_fn bdrv_drain_invoke_entry(void *opaque)
4a2fec
     BlockDriverState *bs = data->bs;
4a2fec
 
4a2fec
     if (data->begin) {
4a2fec
-        bs->drv->bdrv_co_drain(bs);
4a2fec
+        bs->drv->bdrv_co_drain_begin(bs);
4a2fec
     } else {
4a2fec
         bs->drv->bdrv_co_drain_end(bs);
4a2fec
     }
4a2fec
@@ -176,7 +176,7 @@ static void bdrv_drain_invoke(BlockDriverState *bs, bool begin)
4a2fec
 {
4a2fec
     BdrvCoDrainData data = { .bs = bs, .done = false, .begin = begin};
4a2fec
 
4a2fec
-    if (!bs->drv || (begin && !bs->drv->bdrv_co_drain) ||
4a2fec
+    if (!bs->drv || (begin && !bs->drv->bdrv_co_drain_begin) ||
4a2fec
             (!begin && !bs->drv->bdrv_co_drain_end)) {
4a2fec
         return;
4a2fec
     }
4a2fec
diff --git a/block/qed.c b/block/qed.c
4a2fec
index dc54bf4..62d12db 100644
4a2fec
--- a/block/qed.c
4a2fec
+++ b/block/qed.c
4a2fec
@@ -265,7 +265,7 @@ static bool qed_plug_allocating_write_reqs(BDRVQEDState *s)
4a2fec
     assert(!s->allocating_write_reqs_plugged);
4a2fec
     if (s->allocating_acb != NULL) {
4a2fec
         /* Another allocating write came concurrently.  This cannot happen
4a2fec
-         * from bdrv_qed_co_drain, but it can happen when the timer runs.
4a2fec
+         * from bdrv_qed_co_drain_begin, but it can happen when the timer runs.
4a2fec
          */
4a2fec
         qemu_co_mutex_unlock(&s->table_lock);
4a2fec
         return false;
4a2fec
@@ -358,7 +358,7 @@ static void bdrv_qed_attach_aio_context(BlockDriverState *bs,
4a2fec
     }
4a2fec
 }
4a2fec
 
4a2fec
-static void coroutine_fn bdrv_qed_co_drain(BlockDriverState *bs)
4a2fec
+static void coroutine_fn bdrv_qed_co_drain_begin(BlockDriverState *bs)
4a2fec
 {
4a2fec
     BDRVQEDState *s = bs->opaque;
4a2fec
 
4a2fec
@@ -1608,7 +1608,7 @@ static BlockDriver bdrv_qed = {
4a2fec
     .bdrv_check               = bdrv_qed_check,
4a2fec
     .bdrv_detach_aio_context  = bdrv_qed_detach_aio_context,
4a2fec
     .bdrv_attach_aio_context  = bdrv_qed_attach_aio_context,
4a2fec
-    .bdrv_co_drain            = bdrv_qed_co_drain,
4a2fec
+    .bdrv_co_drain_begin      = bdrv_qed_co_drain_begin,
4a2fec
 };
4a2fec
 
4a2fec
 static void bdrv_qed_init(void)
4a2fec
diff --git a/include/block/block_int.h b/include/block/block_int.h
4a2fec
index 98d02ba..e02d540 100644
4a2fec
--- a/include/block/block_int.h
4a2fec
+++ b/include/block/block_int.h
4a2fec
@@ -320,7 +320,7 @@ struct BlockDriver {
4a2fec
     int (*bdrv_probe_geometry)(BlockDriverState *bs, HDGeometry *geo);
4a2fec
 
4a2fec
     /**
4a2fec
-     * bdrv_co_drain is called if implemented in the beginning of a
4a2fec
+     * bdrv_co_drain_begin is called if implemented in the beginning of a
4a2fec
      * drain operation to drain and stop any internal sources of requests in
4a2fec
      * the driver.
4a2fec
      * bdrv_co_drain_end is called if implemented at the end of the drain.
4a2fec
@@ -329,7 +329,7 @@ struct BlockDriver {
4a2fec
      * requests, or toggle an internal state. After the end of the drain new
4a2fec
      * requests will continue normally.
4a2fec
      */
4a2fec
-    void coroutine_fn (*bdrv_co_drain)(BlockDriverState *bs);
4a2fec
+    void coroutine_fn (*bdrv_co_drain_begin)(BlockDriverState *bs);
4a2fec
     void coroutine_fn (*bdrv_co_drain_end)(BlockDriverState *bs);
4a2fec
 
4a2fec
     void (*bdrv_add_child)(BlockDriverState *parent, BlockDriverState *child,
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec