From patchwork Thu Mar 21 09:09:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Orit Wasserman X-Patchwork-Id: 229614 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 042272C00C0 for ; Thu, 21 Mar 2013 20:57:36 +1100 (EST) Received: from localhost ([::1]:35441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIbXf-0001r0-Ng for incoming@patchwork.ozlabs.org; Thu, 21 Mar 2013 05:12:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIbUV-0006kW-VI for qemu-devel@nongnu.org; Thu, 21 Mar 2013 05:08:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIbUQ-0005ZO-Qn for qemu-devel@nongnu.org; Thu, 21 Mar 2013 05:08:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIbUQ-0005YL-KS for qemu-devel@nongnu.org; Thu, 21 Mar 2013 05:08:50 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2L98nap004684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Mar 2013 05:08:49 -0400 Received: from dhcp-1-120.tlv.redhat.com (vpn-200-38.tlv.redhat.com [10.35.200.38]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2L98Z4E016557; Thu, 21 Mar 2013 05:08:45 -0400 From: Orit Wasserman To: qemu-devel@nongnu.org Date: Thu, 21 Mar 2013 11:09:21 +0200 Message-Id: <1363856971-4601-3-git-send-email-owasserm@redhat.com> In-Reply-To: <1363856971-4601-1-git-send-email-owasserm@redhat.com> References: <1363856971-4601-1-git-send-email-owasserm@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Orit Wasserman , pbonzini@redhat.com, mst@redhat.com, chegu_vinod@hp.com, quintela@redhat.com Subject: [Qemu-devel] [RFC 02/12] Add QemuFileWritevBuffer QemuFileOps X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This will allow us to write an iovec Signed-off-by: Orit Wasserman --- include/migration/qemu-file.h | 7 +++++++ 1 file changed, 7 insertions(+) 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);