qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Kevin Wolf <kwolf@redhat.com>,
	Denis Plotnikov <dplotnikov@virtuozzo.com>
Cc: berrange@redhat.com, ehabkost@redhat.com, qemu-block@nongnu.org,
	qemu-devel@nongnu.org, mreitz@redhat.com, pbonzini@redhat.com,
	den@virtuozzo.com
Subject: Re: [PATCH v0 0/2] allow to set 'drive' property on a realized block device
Date: Tue, 3 Mar 2020 10:43:41 +0300	[thread overview]
Message-ID: <f785fbae-c120-c3bc-eafc-e6a62dd89d99@virtuozzo.com> (raw)
In-Reply-To: <20200302153939.GE4965@linux.fritz.box>

02.03.2020 18:39, Kevin Wolf wrote:
> Am 02.03.2020 um 14:55 hat Denis Plotnikov geschrieben:
>>
>>
>> On 02.03.2020 16:38, Kevin Wolf wrote:
>>> Am 10.11.2019 um 20:03 hat Denis Plotnikov geschrieben:
>>>> This allows to replace the file on a block device and is useful
>>>> to workaround the cases (migration) when the VM image is placed on
>>>> some shared storage with exclusive file opening model but the image
>>>> should be open form more than one app.
>>>>
>>>> The previous version of approaching the workaround was based on the
>>>> "blockdev-change-medium" command modification but had some flaws:
>>>>     * semantics: blockdev-change-medium is aimed to be used with removable devices
>>>>       only
>>>>     * interface: it can't accept all possible combination of parameters for
>>>>       the "drive" replacement (creation).
>>>>
>>>> More details here: http://patchwork.ozlabs.org/patch/1179329/
>>>>
>>>> The current series suggests another approach:
>>>> 1. blockdev-add
>>>> 2. qom-set disk.drive = the blockdev added (this is what the series adds)
>>> Are you still planning to send another version?
>>>
>>> Kevin
>> Not in the near future :) There is an unresolved problem with
>> bitmap-migration is case of block dev replacement.
>> Still don't know how to do it in the proper way.
> 
> I seem to remember that in some discussion a while ago we came to the
> conclusion that we need a way for the managemnt tool to provide a
> mapping from source node-names to destination node-names.

Yes, it's planned solution for bitmaps migration, but it doesn't help here.

> 
> Or is the problem you mean unrelated to identifying the node to which a
> bitmap should belong?
> 

The problem here is following:

We need to workaround migration on shared fs, which doesn't
allow to open file on node A if it is opened RW on node B
(and visa-versa).

So, we tried to start target with null-co stub instead of shared
qcow2 and than switch to correct file at some moment. The
problem with bitmaps migration is that we migrate bitmaps to
null-co and than they are lost... So we need to implement some
moving bitmaps from null-co to qcow2 node, keeping in mind that
they are in progress of migration. We didn't try to implement such
moving, it seemed too tricky.

I also had an idea of a flag for file-posix to close fd on inactivation..
But then we need to not open it when openining in inactive mode, and this
needs support in qcow2, which doesn't seem better than null-co stub.

So, I see two ways of solving this:

1. Use null-co stub and deal with moving bitmaps during postcopy
2. Move to UNOPENED mode for bdrv, which is similar to INACTIVE,
but doesn't allow to open any files on fs. We'll have to provide size
as an option anyway.. Sounds bad.

Could you give an advice?


-- 
Best regards,
Vladimir


      reply	other threads:[~2020-03-03  7:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10 19:03 [PATCH v0 0/2] allow to set 'drive' property on a realized block device Denis Plotnikov
2019-11-10 19:03 ` [PATCH v0 1/2] qdev-properties-system: extend set_pionter for unrealized devices Denis Plotnikov
2019-11-18 18:54   ` Eduardo Habkost
2019-11-22 11:36     ` Denis Plotnikov
2019-11-25 15:30       ` Eduardo Habkost
2019-11-26  6:49         ` Denis Plotnikov
2019-11-26 16:38           ` Kevin Wolf
2019-11-10 19:03 ` [PATCH v0 2/2] block: allow to set 'drive' property on a realized block device Denis Plotnikov
2019-11-10 19:08   ` Denis Plotnikov
2019-11-18 10:50     ` Denis Plotnikov
2019-12-13  7:30       ` [PING]Re: " Denis Plotnikov
2019-12-13 10:32       ` Kevin Wolf
2019-12-16 14:51         ` Denis Plotnikov
2019-12-16 15:38           ` Kevin Wolf
2019-12-16 15:58             ` Denis Plotnikov
2019-11-18 10:30 ` [PATCH v0 0/2] " Denis Plotnikov
2020-03-02 13:38 ` Kevin Wolf
2020-03-02 13:55   ` Denis Plotnikov
2020-03-02 15:39     ` Kevin Wolf
2020-03-03  7:43       ` Vladimir Sementsov-Ogievskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f785fbae-c120-c3bc-eafc-e6a62dd89d99@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=berrange@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=ehabkost@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).