Received: from eggs.gnu.org ([2001:4830:134:3::10]:50450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuMZa-00077Z-0r for qemu-devel@nongnu.org; Mon, 18 May 2015 11:03:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuMZZ-0005Mq-5D for qemu-devel@nongnu.org; Mon, 18 May 2015 11:03:17 -0400 Date: Mon, 18 May 2015 17:03:05 +0200 From: Kevin Wolf Message-ID: <20150518150305.GI5999@noname.str.redhat.com> References: <1429747493-24397-1-git-send-email-jsnow@redhat.com> <1429747493-24397-2-git-send-email-jsnow@redhat.com> <20150507145440.GN13985@stefanha-thinkpad.redhat.com> <554B9F52.9020003@redhat.com> <20150508131432.GO13985@stefanha-thinkpad.redhat.com> <554CC835.80706@redhat.com> <20150511131032.GD16270@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <20150511131032.GD16270@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 01/10] qapi: Add transaction support to block-dirty-bitmap operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: famz@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, vsementsov@parallels.com, stefanha@redhat.com --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 11.05.2015 um 15:10 hat Stefan Hajnoczi geschrieben: > On Fri, May 08, 2015 at 08:29:09AM -0600, Eric Blake wrote: > > On 05/08/2015 07:14 AM, Stefan Hajnoczi wrote: > >=20 > > > No it doesn't. Actions have to appear atomic to the qmp_transaction > > > caller. Both approaches achieve that so they are both correct in > > > isolation. > > >=20 > > > The ambiguity is whether "commit the changes" for .commit() means > > > "changes take effect" or "discard stashed state, making undo > > > impossible". > > >=20 > > > I think the "discard stashed state, making undo impossible" > > > interpretation is good because .commit() is not allowed to fail. That > > > function should only do things that never fail. > > >=20 > > >> That's going to get hard to maintain as we add more transactions. > > >=20 > > > Yes, we need to be consistent and stick to one of the interpretations= in > > > order to guarantee ordering. > > >=20 > > > Unfortunately, there is already an inconsistency: > > >=20 > > > 1. internal_snapshot - snapshot taken in .prepare() > > > 2. external_snapshot - BDS node appended in .commit() > > > 3. drive_backup - block job started in .prepare() > > > 4. blockdev_backup - block job started in .prepare() > > >=20 > > > external_snapshot followed by internal_snapshot acts like the reverse > > > ordering! > >=20 > > Is that fatal, though? >=20 > Yes, ordering is critical when add-bitmap or clear-bitmap are combined > with drive-backup. Typically the drive-backup must happen after > add-bitmap or clear-bitmap. Is there a reason to include add-bitmap/clear-bitmap in the transaction rather than preparing everything before the transaction and then only starting the backup (possibly of multiple disks) in a transaction? The original assumption was that there are no interdependencies between different transaction commands and the order is undefined. Kevin --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJVWf8pAAoJEH8JsnLIjy/WzlkP/jeMsjtsS3FX1p36142i1V3a EnyQI+qAjQ/n4KFifOtkgkFeY63a9oH4egaL7e22Oop3h6G46Ata21Dr6IWILg4H qeOeqVgS0JObMDWOJyTl4H9D/JrcdVAPU3pfI50l89XNdvrz03h0MR/xU+oe+0lw Zh01CPJWovzFV6sT+ft/o3tYyMMQml5QnIbsH3eG/bG1bxxgD/RmauBFwUvpKAUA 75DAGsc/ndOmfV2Ys74ARoI/ytJqVTdfD+QSOnE7U9J1OdfS59saHGtYCAtbNmqL 2KA6rJHCY6NdXqhW5EB1BzmWF0wV/KjD2B0vUEaGtNC8CZron/NT5rku6I642vo1 bFw46jzZPkVI21Zqsuae3w8BXeYMFZj+LHwZdNe4afnxDf00KG6W5ECfzguBOlNK 2kpBgJMF1xd9rYQsRaSX2ldSKQZPePR7hjdrpTp5N1zocRczdF6Q88vdeiNulukO ozYDEuDCbUArwid8ovY5zABD9vG+Eg2SZJ521yH2Xei44+GggNyhCIgaAFPub4PK 1QPKzvrToCM8IIcteILLWrKApiYJ9WqhoaTgUb1RR4XP0cHFvNDV21me9ReI0W1Z 7/iUXZMUjx6bb1yKSj09LPsulgUI2K4YK1ua+HQGrBCreAK5p8+pjNz8Qm43Bm2o ParkYTReF/jdzQo5o+fR =wywp -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC--