[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH RFC 1/1] Stream block job involves

From: Alberto Garcia
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH RFC 1/1] Stream block job involves copy-on-read filter
Date: Tue, 12 Feb 2019 12:35:13 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Mon 11 Feb 2019 05:58:05 PM CET, Vladimir Sementsov-Ogievskiy wrote:
>>> The problem is in the concept of "base" node. The code written in
>>> manner that base is not changed during block job. However, job don't
>>> own base and there is no guarantee that it will not change during
>>> the job.
>> But if that's the case then we have a problem already, because 'base'
>> is a member of StreamBlockJob and is used in the existing
>> stream_run() code.
> I think it should be possible to reproduce, using block-commit (which
> already has filter) with block-stream in parallel, we'll try.

It's not possible to run block-stream and block-commit in parallel on
the same nodes. See iotest 030 for a few examples.

So unless there's a bug it should be safe.

>> So if there's a way to make 'base' disappear during the job (how?)
>> then we could protect it with block_job_add_bdrv().
> I'm not sure this is correct. What is the reason for stream to own
> base? It's not really interested in it.

stream does not need to write or modify base, but it does need to keep a
reference to it in order to now where to stop copying data.

As I said earlier base is a member of StreamBlockJob, so it should not
disappear during the job.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]