[{"id":1761962,"web_url":"http://patchwork.ozlabs.org/comment/1761962/","msgid":"<832e1069-c74c-cb20-bb7b-65032df8eabe@redhat.com>","list_archive_url":null,"date":"2017-09-01T20:21:10","subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 09/01/2017 03:10 PM, Brian Steffens wrote:\n> This adds a boolean option called 'shared' to block devices. It defaults\n> to off/false. When enabled for a particular block device, the 'shared' option\n> causes the block migration code to skip over syncing of that device. This\n> allows controlling exactly which block devices get synced during a migration.\n> \n> Signed-off-by: Brian Steffens <briansteffens@gmail.com>\n> ---\n>  block.c                   | 7 +++++++\n>  block/qapi.c              | 2 ++\n>  include/block/block.h     | 1 +\n>  include/block/block_int.h | 3 +++\n>  migration/block.c         | 4 ++++\n>  qapi/block-core.json      | 2 +-\n>  6 files changed, 18 insertions(+), 1 deletion(-)\n> \n\n> +++ b/qapi/block-core.json\n> @@ -365,7 +365,7 @@\n>              '*bps_wr_max_length': 'int', '*iops_max_length': 'int',\n>              '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int',\n>              '*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheInfo',\n> -            'write_threshold': 'int' } }\n> +            'write_threshold': 'int', 'shared': 'bool' } }\n\nMissing documentation, which should include '(since 2.11)'.  The new\nparameter should be optional on input; but it looks like you've only\nmodified a structure that is present on output - so you're missing a\nQAPI edit that mirrors the command-line edit.","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 3xkVyJ4NfYz9s4s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 06:21:44 +1000 (AEST)","from localhost ([::1]:58762 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 1dnsRi-0005XU-OU\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 16:21:42 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35163)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnsRI-0005Wi-Q6\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 16:21:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnsRF-00062A-NJ\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 16:21:16 -0400","from mx1.redhat.com ([209.132.183.28]:47496)\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>) id 1dnsRF-00060R-Dv\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 16:21:13 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\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 811A890C92;\n\tFri,  1 Sep 2017 20:21:12 +0000 (UTC)","from [10.10.121.149] (ovpn-121-149.rdu2.redhat.com [10.10.121.149])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 9D8A5173AF;\n\tFri,  1 Sep 2017 20:21:11 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 811A890C92","To":"Brian Steffens <briansteffens@gmail.com>, qemu-devel@nongnu.org","References":"<20170901201054.11738-1-briansteffens@gmail.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<832e1069-c74c-cb20-bb7b-65032df8eabe@redhat.com>","Date":"Fri, 1 Sep 2017 15:21:10 -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":"<20170901201054.11738-1-briansteffens@gmail.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"PPa7Ux7oGkb1ovqqgEa4iuNCXSacrH3FF\"","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tFri, 01 Sep 2017 20:21:12 +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 1/1] block: add block device shared field","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>","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":1763165,"web_url":"http://patchwork.ozlabs.org/comment/1763165/","msgid":"<20170905095610.GF17449@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-05T09:56:10","subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Fri, Sep 01, 2017 at 08:10:54PM +0000, Brian Steffens wrote:\n> This adds a boolean option called 'shared' to block devices. It defaults\n> to off/false. When enabled for a particular block device, the 'shared' option\n> causes the block migration code to skip over syncing of that device. This\n> allows controlling exactly which block devices get synced during a migration.\n> \n> Signed-off-by: Brian Steffens <briansteffens@gmail.com>\n> ---\n>  block.c                   | 7 +++++++\n>  block/qapi.c              | 2 ++\n>  include/block/block.h     | 1 +\n>  include/block/block_int.h | 3 +++\n>  migration/block.c         | 4 ++++\n>  qapi/block-core.json      | 2 +-\n>  6 files changed, 18 insertions(+), 1 deletion(-)\n\nThanks for the patch!  Please email the relevant maintainers:\n\n  $ scripts/get_maintainer.pl -f block.c\n  Kevin Wolf <kwolf@redhat.com> (supporter:Block layer core)\n  Max Reitz <mreitz@redhat.com> (supporter:Block layer core)\n  qemu-block@nongnu.org (open list:Block layer core)\n  qemu-devel@nongnu.org (open list:All patches CC here)\n\nI have CCed them so they see this email.\n\n> diff --git a/migration/block.c b/migration/block.c\n> index 9171f60028..b347c3dc61 100644\n> --- a/migration/block.c\n> +++ b/migration/block.c\n> @@ -402,6 +402,10 @@ static int init_blk_migration(QEMUFile *f)\n>      bmds_bs = g_malloc0(num_bs * sizeof(*bmds_bs));\n>  \n>      for (i = 0, bs = bdrv_first(&it); bs; bs = bdrv_next(&it), i++) {\n> +        if (bs->shared) {\n> +            continue;\n> +        }\n> +\n\nHave you considered extending the 'migrate' command with a list of\ndrives instead?\n\n  { 'command': 'migrate',\n    'data': {'*blk': 'bool',\n\t     '*drives': ['str'], <--- new!\n\t     ...}}\n\nThat way the set of drives doesn't need to be decided until migration\ntime.  It avoids adding new state to BlockDriverState that is used only\nby the legacy block/migration.c code.\n\nIn case you haven't seen it, the preferred approach for non-shared\nstorage migration is drive-mirror + NBD.  The block/migration.c code is\nan older feature that is less flexible.  More info on drive-mirror +\nNBD:\nhttp://wiki.libvirt.org/page/NBD_storage_migration\nSlide 29 in http://events.linuxfoundation.org/sites/events/files/slides/A-Practical-Look-at-QEMU-Block-Layer-Primitives.pdf\n\nStefan","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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"eY0Uiify\"; dkim-atps=neutral"],"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 3xmhxZ5CLgz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 19:58:42 +1000 (AEST)","from localhost ([::1]:57840 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 1dpAcy-0005vP-Sd\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 05:58:40 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34924)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dpAak-0004PF-0C\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:56:26 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dpAaf-0003LQ-A9\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:56:22 -0400","from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35136)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <stefanha@gmail.com>)\n\tid 1dpAaf-0003KJ-2e; Tue, 05 Sep 2017 05:56:17 -0400","by mail-wm0-x244.google.com with SMTP id e64so2521650wmi.2;\n\tTue, 05 Sep 2017 02:56:16 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\tl49sm110042edc.6.2017.09.05.02.56.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 05 Sep 2017 02:56:15 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=vVy5/OdGUwH6Y0xg9AFrvH3Tin2o+UR8OvEB0daetQQ=;\n\tb=eY0Uiify8EQqoRPUATqy6BJvcZPOvBZtqm38cU23g7/87S3PZIN5ZIA3VzsKAFlsy7\n\tALZC1OGhhS3t+E3YSENmSVm/Cooq9D+/DwGil3BRT5S2Q2yL1ADrk2G2m7tMvRKeKx2x\n\t0c0Vjce6eirRFRvKq0rCAUi29FaLy7q9vxUsQy4DLYx0irMkS6BH+WdI12OB0yzodnIE\n\tA+/YXokdcAG4SoCIbU0CNesHnDIFuWlmwRLgOvMXCN/qkyKBBTuuc7aum82+krRInX14\n\tj83LVJLHNB9m8ZTjke+EQ4Exon2LJIGUFfYaRRTL766I0/l1ay0harRvnBcB5qdLQCZt\n\tn1iw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=vVy5/OdGUwH6Y0xg9AFrvH3Tin2o+UR8OvEB0daetQQ=;\n\tb=ELgvau+VZu8AtWIxdqcD5hD5qWr19UNhqLROaalb5l4SgkTITeTsO51stS6FrARITU\n\tit/+pcq/AdlLCbxWMx2Zd02SLwpIdXB+u3n5q/twrFLdoochnJNsXOZwAFW7FsP2VkQL\n\t8r2VFolQQYww5ef7QV087/tGK4xWpuKba+TFZdZBOTz1wcv0NpmFrzJ0j0K7fzkftlc1\n\t+vlYujxoRAaOQjtMREule0RzW7ntpKmmWfmncxNbq8VjRgkQp4CYCDLoRNTg2Wt7gyze\n\t+gINw3m/0A8m03bEfXhuemIQOP7HgmSL0xWGOTMvT+DeKeFbKHz0WAnD2vcBSj3BokTv\n\tNGHw==","X-Gm-Message-State":"AHPjjUil+7wWn0kg99tFDnENQYAimllt4BBxvb5ezbiILo33kWcLkC4p\n\truMWurRGA4Kckw==","X-Google-Smtp-Source":"ADKCNb7khmay6iWBv15NCf9JD5GDZpN53aFNPHMfBY6zK/riXn/3RJlNw8DDTgZuVrbwjWn6kDLFuw==","X-Received":"by 10.80.179.17 with SMTP id q17mr2762451edd.131.1504605375890; \n\tTue, 05 Sep 2017 02:56:15 -0700 (PDT)","Date":"Tue, 5 Sep 2017 10:56:10 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Brian Steffens <briansteffens@gmail.com>","Message-ID":"<20170905095610.GF17449@stefanha-x1.localdomain>","References":"<20170901201054.11738-1-briansteffens@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170901201054.11738-1-briansteffens@gmail.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::244","Subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","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":"Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org,\n\tqemu-block@nongnu.org, Max 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":1763437,"web_url":"http://patchwork.ozlabs.org/comment/1763437/","msgid":"<CALGxsMdOM_pv-uqMoC0MSVo0ai1vm_nHdZ5U8BNt+YNMXQEpkA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-05T15:10:55","subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","submitter":{"id":72281,"url":"http://patchwork.ozlabs.org/api/people/72281/","name":"Brian Steffens","email":"briansteffens@gmail.com"},"content":"Thanks for taking a look at the patch and fixing the missing CC\naddresses!\n\n> Have you considered extending the 'migrate' command with a list of\n> drives instead?\n\nThat was my original plan but I thought having information on whether a\ndevice is shared or not could potentially be useful to other systems. If\nnot then you're right, it would be a lighter touch to add it only to the\n'migrate' command.\n\n> In case you haven't seen it, the preferred approach for non-shared\n> storage migration is drive-mirror + NBD.  The block/migration.c code is\n> an older feature that is less flexible.  More info on drive-mirror +\n> NBD:\n\nI didn't realize drive-mirror + NBD was the preferred approach. Are\nthere any plans to drop support for the block/migration.c style?","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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"E06BybVe\"; dkim-atps=neutral"],"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 3xmqtg2ylFz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 01:11:38 +1000 (AEST)","from localhost ([::1]:59567 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 1dpFVn-0004lM-UQ\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 11:11:35 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40049)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <briansteffens@gmail.com>) id 1dpFVM-0004kR-KH\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 11:11:18 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <briansteffens@gmail.com>) id 1dpFVC-0007DR-Oo\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 11:11:08 -0400","from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]:34641)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <briansteffens@gmail.com>)\n\tid 1dpFVC-0007CR-JB; Tue, 05 Sep 2017 11:10:58 -0400","by mail-io0-x243.google.com with SMTP id b142so1824187ioe.1;\n\tTue, 05 Sep 2017 08:10:57 -0700 (PDT)","by 10.107.27.205 with HTTP; Tue, 5 Sep 2017 08:10:55 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=wzkI5gMvYbyo91kOFRJeGPDk43jNNC73oLEhAUzNCRs=;\n\tb=E06BybVeq4KzfO37mfwo7je6iMCipeO2AuHOvUb//x1CZH1g7/57jdpbaEh2UmDtWK\n\tY97uDyd7x18W97kqYzqHEVz0GMHNKQLLQmW3YjxYGLqEXW01tigdnW3UBDzv1B9Ia7kq\n\taJCPtb02V28LtdFaZTp3o3P82rYkoJJpeCvU2FKQjIaGImzZoKR1mffll6Qsg/O717Li\n\tieIxBfr5kPNFNZTwvIr/tKy0iTicdgR8D65/CcP9uEh5hIRMaAOcvQxJ7phulHqtOuUq\n\tgKs+Hviqby3b6CXQCJw7TckUgJKTElG1lYO3bA+2l47ozRmh5McGEAXTbTrA0IQcrTcE\n\tAmDA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=wzkI5gMvYbyo91kOFRJeGPDk43jNNC73oLEhAUzNCRs=;\n\tb=ThSn/ArloTtFauiVgKAJp7xqgqpLMmyYDMYHdRCEqWcMiU5rcQM5yk/f1VAW5w76de\n\t1Zo7gA/uhN2SD6zdU72DbhLQ85TOw4G+1jiJTLTfHdICS38nMSnJ8zVb4TcETLUo4xZ7\n\tBxfeyJ/AS/oU+a77mJDrilsZEYror8W3lcDM7fPR1I12/8+z7zABhz0EoADn0KtwmSI6\n\tYqeKax6Rpg5XcngBX7YfkL8gPIe5BsNevboo05zAduRn7w59MUl/OXSkiEHgs8SzoIy9\n\tNsem91hrv85EC9CHCwvTKr7wE1nYXgxK3ZUzZ7ewMn3Y7wDAVQob6PgFHLFqMetXJR9j\n\tDaDA==","X-Gm-Message-State":"AHPjjUhJ20bQFy4TMEROTRz6w9KbNPMpIPebokLeKfVNFOay/zS7fGEI\n\tEQv4zEGdV1NH8644GxMKwprbv4iRBg==","X-Google-Smtp-Source":"ADKCNb7Dvoju8gM6CpgbwFrVMBHiPsMrqey2pfpA+L9lwy3J4VK7Ulp9xd+H4L1K4tTqUjVJ5ifzSeVidwkpWpts9I0=","X-Received":"by 10.107.185.8 with SMTP id j8mr4360778iof.15.1504624256547;\n\tTue, 05 Sep 2017 08:10:56 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170905095610.GF17449@stefanha-x1.localdomain>","References":"<20170901201054.11738-1-briansteffens@gmail.com>\n\t<20170905095610.GF17449@stefanha-x1.localdomain>","From":"Brian Steffens <briansteffens@gmail.com>","Date":"Tue, 5 Sep 2017 11:10:55 -0400","Message-ID":"<CALGxsMdOM_pv-uqMoC0MSVo0ai1vm_nHdZ5U8BNt+YNMXQEpkA@mail.gmail.com>","To":"Stefan Hajnoczi <stefanha@gmail.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c06::243","Subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","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":"Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org,\n\tqemu-block@nongnu.org, Max 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":1763825,"web_url":"http://patchwork.ozlabs.org/comment/1763825/","msgid":"<20170906055804.GA26413@lemon.lan>","list_archive_url":null,"date":"2017-09-06T05:58:05","subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Tue, 09/05 10:56, Stefan Hajnoczi wrote:\n> On Fri, Sep 01, 2017 at 08:10:54PM +0000, Brian Steffens wrote:\n> > This adds a boolean option called 'shared' to block devices. It defaults\n> > to off/false. When enabled for a particular block device, the 'shared' option\n> > causes the block migration code to skip over syncing of that device. This\n> > allows controlling exactly which block devices get synced during a migration.\n> > \n> > Signed-off-by: Brian Steffens <briansteffens@gmail.com>\n> > ---\n> >  block.c                   | 7 +++++++\n> >  block/qapi.c              | 2 ++\n> >  include/block/block.h     | 1 +\n> >  include/block/block_int.h | 3 +++\n> >  migration/block.c         | 4 ++++\n> >  qapi/block-core.json      | 2 +-\n> >  6 files changed, 18 insertions(+), 1 deletion(-)\n> \n> Thanks for the patch!  Please email the relevant maintainers:\n> \n>   $ scripts/get_maintainer.pl -f block.c\n>   Kevin Wolf <kwolf@redhat.com> (supporter:Block layer core)\n>   Max Reitz <mreitz@redhat.com> (supporter:Block layer core)\n>   qemu-block@nongnu.org (open list:Block layer core)\n>   qemu-devel@nongnu.org (open list:All patches CC here)\n> \n> I have CCed them so they see this email.\n> \n> > diff --git a/migration/block.c b/migration/block.c\n> > index 9171f60028..b347c3dc61 100644\n> > --- a/migration/block.c\n> > +++ b/migration/block.c\n> > @@ -402,6 +402,10 @@ static int init_blk_migration(QEMUFile *f)\n> >      bmds_bs = g_malloc0(num_bs * sizeof(*bmds_bs));\n> >  \n> >      for (i = 0, bs = bdrv_first(&it); bs; bs = bdrv_next(&it), i++) {\n> > +        if (bs->shared) {\n\nIf we go with this approach, I'd prefer a more specific name like\nbs->skip_block_migration; \"shared\" has a lot meanings so is less readable.\n\nFam\n\n> > +            continue;\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-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@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 3xnCZ74lgCz9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 15:58:39 +1000 (AEST)","from localhost ([::1]:34235 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 1dpTMD-0008Ve-Rd\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 01:58:37 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55376)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dpTLr-0008TQ-Ey\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 01:58:16 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dpTLq-00049E-J6\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 01:58:15 -0400","from mx1.redhat.com ([209.132.183.28]:33214)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>)\n\tid 1dpTLk-00046P-Lk; Wed, 06 Sep 2017 01:58:08 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\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 62FA3883A2;\n\tWed,  6 Sep 2017 05:58:07 +0000 (UTC)","from localhost (ovpn-12-90.pek2.redhat.com [10.72.12.90])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id B6D2260BE6;\n\tWed,  6 Sep 2017 05:58:06 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 62FA3883A2","Date":"Wed, 6 Sep 2017 13:58:05 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Brian Steffens <briansteffens@gmail.com>,\n\tStefan Hajnoczi <stefanha@gmail.com>","Message-ID":"<20170906055804.GA26413@lemon.lan>","References":"<20170901201054.11738-1-briansteffens@gmail.com>\n\t<20170905095610.GF17449@stefanha-x1.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170905095610.GF17449@stefanha-x1.localdomain>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tWed, 06 Sep 2017 05:58:07 +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 1/1] block: add block device shared field","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":"Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org,\n\tqemu-block@nongnu.org, Max 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":1764145,"web_url":"http://patchwork.ozlabs.org/comment/1764145/","msgid":"<20170906141631.GE15535@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-06T14:16:31","subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Tue, Sep 05, 2017 at 11:10:55AM -0400, Brian Steffens wrote:\n> > Have you considered extending the 'migrate' command with a list of\n> > drives instead?\n> \n> That was my original plan but I thought having information on whether a\n> device is shared or not could potentially be useful to other systems. If\n> not then you're right, it would be a lighter touch to add it only to the\n> 'migrate' command.\n\nI agree with Fam that bs->shared doesn't necessarily have the same\nmeaning to everyone.  Therefore I suggest extending the 'migrate'\ncommand instead.\n\n> > In case you haven't seen it, the preferred approach for non-shared\n> > storage migration is drive-mirror + NBD.  The block/migration.c code is\n> > an older feature that is less flexible.  More info on drive-mirror +\n> > NBD:\n> \n> I didn't realize drive-mirror + NBD was the preferred approach. Are\n> there any plans to drop support for the block/migration.c style?\n\nmigration/block.c is not formally deprecated yet.  It's still used by\nlibvirt in situations where NBD connections are not desirable.\nEventually it will probably be deprecated and then removed after 2 more\nQEMU releases according to the deprecation policy (see qemu-doc.texi).\n\nStefan","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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"CZUsqzlE\"; dkim-atps=neutral"],"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 3xnQnY0dL7z9t4c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 00:24:17 +1000 (AEST)","from localhost ([::1]:36387 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 1dpbFX-0005Fc-4k\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 10:24:15 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55400)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dpb8B-0007cJ-PQ\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 10:16:40 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dpb86-00084V-NK\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 10:16:39 -0400","from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36323)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <stefanha@gmail.com>)\n\tid 1dpb86-00084A-Gd; Wed, 06 Sep 2017 10:16:34 -0400","by mail-wm0-x244.google.com with SMTP id p17so5427239wmd.3;\n\tWed, 06 Sep 2017 07:16:34 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\te8sm1439682edd.18.2017.09.06.07.16.32\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 06 Sep 2017 07:16:32 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=7OvqB8ghwGtGmak31NFfGTisbNPF0Nu8vmkhn3Li2VM=;\n\tb=CZUsqzlEtdTsRI6GWhgyxFq/CbMc6PY+dYghtd3GhYU9Qn+CS3KhFCO9WknVt7Q1xJ\n\tyGODdadqQpnosO8fMktlKz/lW6TgzpCN7pxy4Xz81GMo73Y5YNQiAKD6v25+cT1wK1UX\n\td3EM5ifueKqlGTruUoHeghcwBTzqMv0kSoDo3O6lh4dv0iWkj6bSYdRUP4O/F7lclxp8\n\tG/+oSBUUedNQaY7F8IVqVtJuTawvvdUBmxcfhqSTtj766lsF5VOR9XddO46iDEC6dFny\n\tdq4KFR4+fLztZf7CuqWpIltd0UlzvreJTHuE1Eg//Tljz0wskXWECK3eYfKFyWzrGwvL\n\t0UMA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=7OvqB8ghwGtGmak31NFfGTisbNPF0Nu8vmkhn3Li2VM=;\n\tb=Ct3G+0Apl2eicAZ6N8Trbpfo8PnU4V6vwAy8EOBBpZGX5OppMKlASoU6zIdDS+iKr4\n\tzyVLSnxIG58cRUqFYIFG2SD5r1zr8ZUFECJWIO2PlWXuJ0wo3fw3O5JSLA6gCkSiQYmY\n\t0HTgxB1wCmYB2/mwm0hJlxyjQMJAqszIMyBqQ7BpUm6FzrsLcVSgebuja+VsMFCM6lVr\n\t5mlVHa8ezdDQDdKYj/ZzmpNgZTw6OV7RqUasXvGfOh7j5p6up5x1heyKMzV+8BxGXg2L\n\tFWE6xmddi/WG0B4GM7rcBfnc4QN+755+EglSa+ijOoDh+99nAixDmxGwr0WIzS6oPdun\n\t1JBw==","X-Gm-Message-State":"AHPjjUhb9b2oym6Bysy7n6ucZR0kPVDB1Bw//S1sH5/kTU+h/1Oopw+q\n\tSB3o7n2wF+XIIA==","X-Google-Smtp-Source":"ADKCNb4iaTEnjS7dUvK0l2B+mFUZ4D65O57VcFXK8j+MowWu9bEyBKTg2+I1xD9m6pj4ekjQRIUW0A==","X-Received":"by 10.80.136.132 with SMTP id d4mr6179881edd.76.1504707393342;\n\tWed, 06 Sep 2017 07:16:33 -0700 (PDT)","Date":"Wed, 6 Sep 2017 15:16:31 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Brian Steffens <briansteffens@gmail.com>","Message-ID":"<20170906141631.GE15535@stefanha-x1.localdomain>","References":"<20170901201054.11738-1-briansteffens@gmail.com>\n\t<20170905095610.GF17449@stefanha-x1.localdomain>\n\t<CALGxsMdOM_pv-uqMoC0MSVo0ai1vm_nHdZ5U8BNt+YNMXQEpkA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CALGxsMdOM_pv-uqMoC0MSVo0ai1vm_nHdZ5U8BNt+YNMXQEpkA@mail.gmail.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::244","Subject":"Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field","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":"Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org,\n\tqemu-block@nongnu.org, Max 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>"}}]