From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ11l-000402-UN for qemu-devel@nongnu.org; Mon, 23 Feb 2015 16:59:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQ11h-0004t5-RX for qemu-devel@nongnu.org; Mon, 23 Feb 2015 16:58:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ11h-0004su-K6 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 16:58:53 -0500 Message-ID: <54EBA290.8030304@redhat.com> Date: Mon, 23 Feb 2015 14:58:40 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423710438-14377-1-git-send-email-wency@cn.fujitsu.com> <1423710438-14377-5-git-send-email-wency@cn.fujitsu.com> <54EB942A.9000905@redhat.com> In-Reply-To: <54EB942A.9000905@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wRcOFEKapLd0mG6j0kCqKsbKKx8RvpIji" Subject: Re: [Qemu-devel] [RFC PATCH 04/14] Add new block driver interfaces to control disk replication List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , Wen Congyang , qemu devel , Kevin Wolf , Stefan Hajnoczi , Paolo Bonzini Cc: Lai Jiangshan , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , Gonglei , Yang Hongyang , zhanghailiang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wRcOFEKapLd0mG6j0kCqKsbKKx8RvpIji Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/23/2015 01:57 PM, Max Reitz wrote: > On 2015-02-11 at 22:07, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> block.c | 36 ++++++++++++++++++++++++++++++++++++ >> include/block/block.h | 10 ++++++++++ >> include/block/block_int.h | 12 ++++++++++++ >> 3 files changed, 58 insertions(+) >> >> +++ b/include/block/block.h >> @@ -557,4 +557,14 @@ void bdrv_flush_io_queue(BlockDriverState *bs); >> BlockAcctStats *bdrv_get_stats(BlockDriverState *bs); >> +/* Checkpoint control, called in migration/checkpoint thread */ >> +enum { >> + COLO_UNPROTECTED_MODE =3D 0, >> + COLO_PRIMARY_MODE, >> + COLO_SECONDARY_MODE, >> +}; >=20 > I have a feeling that you may want to define these values through QAPI.= =2E. especially if you intend for a QMP command to output which mode a colo disk is in. >> +++ b/include/block/block_int.h >> @@ -273,6 +273,18 @@ struct BlockDriver { >> void (*bdrv_io_unplug)(BlockDriverState *bs); >> void (*bdrv_flush_io_queue)(BlockDriverState *bs); >> + >> + /* Checkpoint control, called in migration/checkpoint thread */ >> + int (*bdrv_start_replication)(BlockDriverState *bs, int mode); >> + /* >> + * Drop Disk buffer when doing checkpoint. >> + */ >> + int (*bdrv_do_checkpoint)(BlockDriverState *bs); Inconsistent comment style between one-line and multi-line. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wRcOFEKapLd0mG6j0kCqKsbKKx8RvpIji Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU66KQAAoJEKeha0olJ0Nqcz8H/2n5M2BozLVsuY5Sh+AiDQBI 2L3COfu2Zg84/xKVMyrFeOuJsaDNlSOvYPGx4MYKSnFswo3XZ9LndCOHdM96sMka 7SbHVhV5u4JHnc9jjeQYZUCFCUfv8o/yWLOREiXKEc1HFYuHaidT62OtYdnvaYtE b/0UTXa/HZjmhKq5mbnYh0dypDkTFc4TrqFiUxGH4tBHvywGb2VI6N61FWw7QnJB Cy7G8mjkYGfFEHv3Ihie6F8UonM6WH54svktlxPIJlcRpA/bBcCRLFeg1eNuF+XQ PjbwvRRTxLcm+2iTZS8lClZic2VURkGGt8nH2agdFrmkz2vdAPYbApF2f86gA6g= =23pO -----END PGP SIGNATURE----- --wRcOFEKapLd0mG6j0kCqKsbKKx8RvpIji--