Patchwork [v3,1/9] Add QemuFileWritevBuffer QemuFileOps

login
register
mail settings
Submitter Orit Wasserman
Date March 21, 2013, 4:05 p.m.
Message ID <1363881940-27505-2-git-send-email-owasserm@redhat.com>
Download mbox | patch
Permalink /patch/229749/
State New
Headers show

Comments

Orit Wasserman - March 21, 2013, 4:05 p.m.
This will allow us to write an iovec

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
---
 include/migration/qemu-file.h | 7 +++++++
 1 file changed, 7 insertions(+)
Juan Quintela - March 21, 2013, 4:57 p.m.
Orit Wasserman <owasserm@redhat.com> wrote:
> This will allow us to write an iovec
>
> Signed-off-by: Orit Wasserman <owasserm@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Patch

diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h
index df81261..8d3da9b 100644
--- a/include/migration/qemu-file.h
+++ b/include/migration/qemu-file.h
@@ -51,11 +51,18 @@  typedef int (QEMUFileCloseFunc)(void *opaque);
  */
 typedef int (QEMUFileGetFD)(void *opaque);
 
+/*
+ * This function writes an iovec to file.
+ */
+typedef int (QEMUFileWritevBufferFunc)(void *opaque, struct iovec *iov,
+                                       int iovcnt);
+
 typedef struct QEMUFileOps {
     QEMUFilePutBufferFunc *put_buffer;
     QEMUFileGetBufferFunc *get_buffer;
     QEMUFileCloseFunc *close;
     QEMUFileGetFD *get_fd;
+    QEMUFileWritevBufferFunc *writev_buffer;
 } QEMUFileOps;
 
 QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops);