[{"id":1768254,"web_url":"http://patchwork.ozlabs.org/comment/1768254/","msgid":"<8db498fd-6f7f-ee78-da44-8e0087243ef1@redhat.com>","list_archive_url":null,"date":"2017-09-14T00:15:12","subject":"Re: [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change\n\tbdrv_dirty_iter_next() to report byte offset","submitter":{"id":64343,"url":"http://patchwork.ozlabs.org/api/people/64343/","name":"John Snow","email":"jsnow@redhat.com"},"content":"On 09/12/2017 04:31 PM, Eric Blake wrote:\n> Thanks to recent cleanups, most callers were scaling a return value\n> of sectors into bytes (the exception, in qcow2-bitmap, will be\n> converted to byte-based iteration later).  Update the interface to\n> do the scaling internally instead.\n> \n> In qcow2-bitmap, the code was specifically checking for an error\n> to be -1; it is more robust to treat all negative values as an\n> error, but at the same time it is also easy enough to ensure we\n> return -1 (and not -512) on error.\n> \n> Signed-off-by: Eric Blake <eblake@redhat.com>\n> \n\nThis patch now smells like a bugfix and a separate incremental feature\nenhancement.\n\nDo we need to backport the error-checking to a possible 2.10.1?\n\nIf no:\n\nReviewed-by: John Snow <jsnow@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jsnow@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xszb8094kz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 10:16:02 +1000 (AEST)","from localhost ([::1]:45140 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsHp1-0007ph-TA\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 20:15:59 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:53484)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dsHoQ-0007nU-Tt\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 20:15:23 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dsHoQ-0002Bd-1u\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 20:15:22 -0400","from mx1.redhat.com ([209.132.183.28]:55022)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <jsnow@redhat.com>)\n\tid 1dsHoL-00027G-HU; Wed, 13 Sep 2017 20:15:17 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 71BC7356C0;\n\tThu, 14 Sep 2017 00:15:16 +0000 (UTC)","from [10.18.17.231] (dhcp-17-231.bos.redhat.com [10.18.17.231])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 0A1E54F31B;\n\tThu, 14 Sep 2017 00:15:12 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 71BC7356C0","To":"Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org","References":"<20170912203119.24166-1-eblake@redhat.com>\n\t<20170912203119.24166-12-eblake@redhat.com>","From":"John Snow <jsnow@redhat.com>","Message-ID":"<8db498fd-6f7f-ee78-da44-8e0087243ef1@redhat.com>","Date":"Wed, 13 Sep 2017 20:15:12 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170912203119.24166-12-eblake@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tThu, 14 Sep 2017 00:15:16 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change\n\tbdrv_dirty_iter_next() to report byte offset","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, vsementsov@virtuozzo.com, Fam Zheng <famz@redhat.com>, \n\tqemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,\n\tMax Reitz <mreitz@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768544,"web_url":"http://patchwork.ozlabs.org/comment/1768544/","msgid":"<228fb135-f4d4-9a35-18c9-584dc3354bb5@redhat.com>","list_archive_url":null,"date":"2017-09-14T11:58:33","subject":"Re: [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change\n\tbdrv_dirty_iter_next() to report byte offset","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 09/13/2017 07:15 PM, John Snow wrote:\n> \n> \n> On 09/12/2017 04:31 PM, Eric Blake wrote:\n>> Thanks to recent cleanups, most callers were scaling a return value\n>> of sectors into bytes (the exception, in qcow2-bitmap, will be\n>> converted to byte-based iteration later).  Update the interface to\n>> do the scaling internally instead.\n>>\n>> In qcow2-bitmap, the code was specifically checking for an error\n>> to be -1; it is more robust to treat all negative values as an\n>> error, but at the same time it is also easy enough to ensure we\n>> return -1 (and not -512) on error.\n>>\n>> Signed-off-by: Eric Blake <eblake@redhat.com>\n>>\n> \n> This patch now smells like a bugfix and a separate incremental feature\n> enhancement.\n\nThere is no bug without this patch; more of a fix to avoid a latent\nregression from happening in further changes.  In v6, I (accidentally)\nhad bdrv_dirty_iter_next() temporarily returning -512 instead of -1 on\nfailure; changing the qcow2 code to treat all negatives instead of\nprecisely -1 as error is enough to avoid that regression, but so also is\nfixing bdrv_dirty_iter_next() to always return -1 on failure.  This\npatch does both, rather than either fix in isolation, but that means we\ndon't need a backport.\n\n> \n> Do we need to backport the error-checking to a possible 2.10.1?\n> \n> If no:\n> \n> Reviewed-by: John Snow <jsnow@redhat.com>\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtHBX6pcvz9ryv\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 21:59:16 +1000 (AEST)","from localhost ([::1]:47111 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsSnb-0002MK-3f\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 07:59:15 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36959)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dsSn8-0002Iu-2G\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 07:58:47 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dsSn7-0006Uf-0O\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 07:58:46 -0400","from mx1.redhat.com ([209.132.183.28]:48234)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>)\n\tid 1dsSn2-0006MW-5y; Thu, 14 Sep 2017 07:58:40 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 24C06742;\n\tThu, 14 Sep 2017 11:58:39 +0000 (UTC)","from [10.10.120.201] (ovpn-120-201.rdu2.redhat.com [10.10.120.201])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8620717AD6;\n\tThu, 14 Sep 2017 11:58:34 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 24C06742","To":"John Snow <jsnow@redhat.com>, qemu-devel@nongnu.org","References":"<20170912203119.24166-1-eblake@redhat.com>\n\t<20170912203119.24166-12-eblake@redhat.com>\n\t<8db498fd-6f7f-ee78-da44-8e0087243ef1@redhat.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<228fb135-f4d4-9a35-18c9-584dc3354bb5@redhat.com>","Date":"Thu, 14 Sep 2017 06:58:33 -0500","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<8db498fd-6f7f-ee78-da44-8e0087243ef1@redhat.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"55AVV01I7nL3RV6NqMfaADv2KsstVFx9V\"","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tThu, 14 Sep 2017 11:58:39 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"Re: [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change\n\tbdrv_dirty_iter_next() to report byte offset","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, vsementsov@virtuozzo.com, Fam Zheng <famz@redhat.com>, \n\tqemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,\n\tMax Reitz <mreitz@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768706,"web_url":"http://patchwork.ozlabs.org/comment/1768706/","msgid":"<7c39548e-260c-db40-d9a5-061165dd36d6@redhat.com>","list_archive_url":null,"date":"2017-09-14T16:03:15","subject":"Re: [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change\n\tbdrv_dirty_iter_next() to report byte offset","submitter":{"id":64343,"url":"http://patchwork.ozlabs.org/api/people/64343/","name":"John Snow","email":"jsnow@redhat.com"},"content":"On 09/14/2017 07:58 AM, Eric Blake wrote:\n> On 09/13/2017 07:15 PM, John Snow wrote:\n>>\n>>\n>> On 09/12/2017 04:31 PM, Eric Blake wrote:\n>>> Thanks to recent cleanups, most callers were scaling a return value\n>>> of sectors into bytes (the exception, in qcow2-bitmap, will be\n>>> converted to byte-based iteration later).  Update the interface to\n>>> do the scaling internally instead.\n>>>\n>>> In qcow2-bitmap, the code was specifically checking for an error\n>>> to be -1; it is more robust to treat all negative values as an\n>>> error, but at the same time it is also easy enough to ensure we\n>>> return -1 (and not -512) on error.\n>>>\n>>> Signed-off-by: Eric Blake <eblake@redhat.com>\n>>>\n>>\n>> This patch now smells like a bugfix and a separate incremental feature\n>> enhancement.\n> \n> There is no bug without this patch; more of a fix to avoid a latent\n\nAh, you're right, I see. Please take the RB.\n\n> regression from happening in further changes.  In v6, I (accidentally)\n> had bdrv_dirty_iter_next() temporarily returning -512 instead of -1 on\n> failure; changing the qcow2 code to treat all negatives instead of\n> precisely -1 as error is enough to avoid that regression, but so also is\n> fixing bdrv_dirty_iter_next() to always return -1 on failure.  This\n> patch does both, rather than either fix in isolation, but that means we\n> don't need a backport.\n> \n>>\n>> Do we need to backport the error-checking to a possible 2.10.1?\n>>\n>> If no:\n>>\n>> Reviewed-by: John Snow <jsnow@redhat.com>\n>>\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jsnow@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtNd60FZZz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 02:04:08 +1000 (AEST)","from localhost ([::1]:48739 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsWcY-00004z-Fb\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 12:04:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:38546)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dsWc2-0008Uj-U0\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 12:03:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dsWc0-0004BO-4t\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 12:03:33 -0400","from mx1.redhat.com ([209.132.183.28]:47618)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <jsnow@redhat.com>)\n\tid 1dsWbu-00047O-QG; Thu, 14 Sep 2017 12:03:26 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id AF6B17F3E2;\n\tThu, 14 Sep 2017 16:03:25 +0000 (UTC)","from [10.10.122.84] (ovpn-122-84.rdu2.redhat.com [10.10.122.84])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 129285D9C7;\n\tThu, 14 Sep 2017 16:03:16 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com AF6B17F3E2","To":"Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org","References":"<20170912203119.24166-1-eblake@redhat.com>\n\t<20170912203119.24166-12-eblake@redhat.com>\n\t<8db498fd-6f7f-ee78-da44-8e0087243ef1@redhat.com>\n\t<228fb135-f4d4-9a35-18c9-584dc3354bb5@redhat.com>","From":"John Snow <jsnow@redhat.com>","Message-ID":"<7c39548e-260c-db40-d9a5-061165dd36d6@redhat.com>","Date":"Thu, 14 Sep 2017 12:03:15 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<228fb135-f4d4-9a35-18c9-584dc3354bb5@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 14 Sep 2017 16:03:25 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change\n\tbdrv_dirty_iter_next() to report byte offset","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, vsementsov@virtuozzo.com, Fam Zheng <famz@redhat.com>, \n\tqemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,\n\tMax Reitz <mreitz@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]