From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVogj-00008i-F3 for qemu-devel@nongnu.org; Mon, 14 Oct 2013 16:24:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVogf-0008TR-2v for qemu-devel@nongnu.org; Mon, 14 Oct 2013 16:24:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVoge-0008TM-QQ for qemu-devel@nongnu.org; Mon, 14 Oct 2013 16:24:21 -0400 Message-ID: <525C52ED.1080907@redhat.com> Date: Mon, 14 Oct 2013 14:24:13 -0600 From: Eric Blake MIME-Version: 1.0 References: <52581B81.4080701@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fknucjFMR1Cb7R4JEs1Hi6wI6BwJ85oek" Subject: Re: [Qemu-devel] [RFC PATCH] drive-backup 'stream' mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wolfgang Richter Cc: Kevin Wolf , Fam Zheng , qemu-devel , imain , stefanha@redhat.com, Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fknucjFMR1Cb7R4JEs1Hi6wI6BwJ85oek Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/14/2013 02:10 PM, Wolfgang Richter wrote: >> >> Add the designation '(since 1.7)' to make it obvious when this mode wa= s >> introduced. >=20 > Done. Is it better to place the updated patch in this thread or start > a new one? http://wiki.qemu.org/Contribute/SubmitAPatch suggests submitting a new top-level thread for each revision of a patch series, along with a changelog after the --- or in the cover letter to help focus reviewers on what changed from the earlier revision. >=20 >> >>> # >>> # Since: 1.3 >>> ## >>> { 'enum': 'MirrorSyncMode', >>> - 'data': ['top', 'full', 'none'] } >>> + 'data': ['top', 'full', 'none', 'stream'] } >> >> MirrorSyncMode is used by multiple commands; your summary mentions how= >> it would affect 'drive-backup', but what happens to 'drive-mirror'? F= or >> that matter, why isn't 'drive-mirror' with mode 'none' doing what you >> already want? >=20 > Okay, I think my impression might be wrong, but I thought > 'drive-mirror' would become deprecated with the new 'drive-backup' > command and code. No - drive-mirror and drive-backup are independent, and both useful. Each fills a niche that the other cannot. >=20 > If we look at what they do (current documentation and code), > 'drive-backup' AFAIK behaves the same for all modes of 'drive-mirror' > _except_ mode 'none' with _better_ consistency guarantees. That is, > 'drive-backup' clearly provides a point-in-time snapshot, whereas > 'drive-mirror' may create a point-in-time snapshot, but it can not > guarantee that. 'drive-backup' creates a point-in-time up front. 'drive-mirror' can be used to create a point-in-time at the tail end (when you gracefully cancel the job once it is in mirroring phase). But it also does not have to be canceled - as long as it is still running, you are still mirroring data. >=20 > In addition, 'drive-backup's code is cleaner, simpler, and easier to > work with (in my opinion) than 'drive-mirror's code. This is because > of the new hooks in block.c for tracked requests etc. so that the job > can insert code to be run on every write in a clean manner (I think). >=20 > I think that it would be less confusing to subsume 'drive-mirror' into > 'drive-backup' so that we have a single command with clear consistency > guarantees, and also it would prevent overloading (and more confusion) > with the meaning of the 'MirrorSyncMode's. You can't break the existing semantics, but if you think you can unify the code base, be my guest. >=20 > Perhaps a better naming scheme for the modes would then be: >=20 > full - as before (same for both commands AFAIK) > top - as before (same for both commands AFAIK) > none - if we only have drive-backup, rename this to 'overlay' as it > creates a low-overhead CoW overlay point-in-time snapshot > stream - either keep my name 'stream' to do what 'none' does for > drive-mirror, or leave this as the 'none' mode with the same > drive-mirror semantics >=20 > Thus, I think, with a single extra mode, drive-backup can subsume > drive-mirror. This reduces the number of commands, the documentation, > and the code (all duplicating each other in some manner). >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fknucjFMR1Cb7R4JEs1Hi6wI6BwJ85oek 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.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSXFLtAAoJEKeha0olJ0Nqjh0IAJ1TTptn/rRguiBP5H0TzABu 9ytxDuNovyTdEkmPQ3AIju9v45PQyzu5GrGyGEo5azXa1svyAGdZ+nq271ypjECl utgchP5CCsRhaleKev4BMUVnLJegIVZ7D47TIBudZzBGoxFjWSeHdxvpQFc5cvHz Nqm4SyFPQcHo0eoZtVqAHMFg6MCjXeN4fgaO+5VVemUAQtMj0y8jqz1b4Ucy6xb7 7a/jZQxhgz2RB7WSv/T1Jwy+7B+m5rRFSZtt9Hlw0sF4KCCl5/HpwvRPaQI8hIEc kqUk3xKxfu+vUxPKt58oYkc9JT47GFEhNwYUc/WG1hyFnBIvKsoqPmYfh/sJaiA= =Y7a7 -----END PGP SIGNATURE----- --fknucjFMR1Cb7R4JEs1Hi6wI6BwJ85oek--