]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 18 Aug 2012 21:37:31 +0000 (23:37 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 28 Aug 2012 06:50:01 +0000 (01:50 -0500)
Put these functions at the beginning, to avoid forward references
in the next patches.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 27cbd828c617944c0f9603763fdf4fa87e7ad923)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/iscsi.c

index 22888a0845de653d9bde09a67b3c8eb08b701ad5..4d345c61041e3d1dc01a9bd97a416aff7271cd02 100644 (file)
@@ -65,6 +65,34 @@ struct IscsiTask {
     int complete;
 };
 
+static void
+iscsi_readv_writev_bh_cb(void *p)
+{
+    IscsiAIOCB *acb = p;
+
+    qemu_bh_delete(acb->bh);
+
+    if (acb->canceled == 0) {
+        acb->common.cb(acb->common.opaque, acb->status);
+    }
+
+    qemu_aio_release(acb);
+}
+
+static int
+iscsi_schedule_bh(QEMUBHFunc *cb, IscsiAIOCB *acb)
+{
+    acb->bh = qemu_bh_new(cb, acb);
+    if (!acb->bh) {
+        error_report("oom: could not create iscsi bh");
+        return -EIO;
+    }
+
+    qemu_bh_schedule(acb->bh);
+    return 0;
+}
+
+
 static void
 iscsi_abort_task_cb(struct iscsi_context *iscsi, int status, void *command_data,
                     void *private_data)
@@ -152,34 +180,6 @@ iscsi_process_write(void *arg)
 }
 
 
-static int
-iscsi_schedule_bh(QEMUBHFunc *cb, IscsiAIOCB *acb)
-{
-    acb->bh = qemu_bh_new(cb, acb);
-    if (!acb->bh) {
-        error_report("oom: could not create iscsi bh");
-        return -EIO;
-    }
-
-    qemu_bh_schedule(acb->bh);
-    return 0;
-}
-
-static void
-iscsi_readv_writev_bh_cb(void *p)
-{
-    IscsiAIOCB *acb = p;
-
-    qemu_bh_delete(acb->bh);
-
-    if (acb->canceled == 0) {
-        acb->common.cb(acb->common.opaque, acb->status);
-    }
-
-    qemu_aio_release(acb);
-}
-
-
 static void
 iscsi_aio_write16_cb(struct iscsi_context *iscsi, int status,
                      void *command_data, void *opaque)