From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpTLr-0008TQ-Ey for qemu-devel@nongnu.org; Wed, 06 Sep 2017 01:58:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpTLq-00049E-J6 for qemu-devel@nongnu.org; Wed, 06 Sep 2017 01:58:15 -0400 Date: Wed, 6 Sep 2017 13:58:05 +0800 From: Fam Zheng Message-ID: <20170906055804.GA26413@lemon.lan> References: <20170901201054.11738-1-briansteffens@gmail.com> <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> Subject: Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brian Steffens , Stefan Hajnoczi Cc: Kevin Wolf , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz On Tue, 09/05 10:56, Stefan Hajnoczi wrote: > On Fri, Sep 01, 2017 at 08:10:54PM +0000, Brian Steffens wrote: > > This adds a boolean option called 'shared' to block devices. It defaults > > to off/false. When enabled for a particular block device, the 'shared' option > > causes the block migration code to skip over syncing of that device. This > > allows controlling exactly which block devices get synced during a migration. > > > > Signed-off-by: Brian Steffens > > --- > > block.c | 7 +++++++ > > block/qapi.c | 2 ++ > > include/block/block.h | 1 + > > include/block/block_int.h | 3 +++ > > migration/block.c | 4 ++++ > > qapi/block-core.json | 2 +- > > 6 files changed, 18 insertions(+), 1 deletion(-) > > Thanks for the patch! Please email the relevant maintainers: > > $ scripts/get_maintainer.pl -f block.c > Kevin Wolf (supporter:Block layer core) > Max Reitz (supporter:Block layer core) > qemu-block@nongnu.org (open list:Block layer core) > qemu-devel@nongnu.org (open list:All patches CC here) > > I have CCed them so they see this email. > > > diff --git a/migration/block.c b/migration/block.c > > index 9171f60028..b347c3dc61 100644 > > --- a/migration/block.c > > +++ b/migration/block.c > > @@ -402,6 +402,10 @@ static int init_blk_migration(QEMUFile *f) > > bmds_bs = g_malloc0(num_bs * sizeof(*bmds_bs)); > > > > for (i = 0, bs = bdrv_first(&it); bs; bs = bdrv_next(&it), i++) { > > + if (bs->shared) { If we go with this approach, I'd prefer a more specific name like bs->skip_block_migration; "shared" has a lot meanings so is less readable. Fam > > + continue; > > + } > > +