From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Cc: "jcody@redhat.com" <jcody@redhat.com>,
"kwolf@redhat.com" <kwolf@redhat.com>,
"mreitz@redhat.com" <mreitz@redhat.com>,
Denis Lunev <den@virtuozzo.com>
Subject: Re: [Qemu-devel] [PATCH RFC 1/1] Stream block job involves copy-on-read filter
Date: Wed, 23 Jan 2019 13:10:32 +0000 [thread overview]
Message-ID: <2436ebfb-9b1c-b88f-3512-5187f34cdf69@virtuozzo.com> (raw)
In-Reply-To: <1548244464-633186-1-git-send-email-andrey.shinkevich@virtuozzo.com>
23.01.2019 14:54, Andrey Shinkevich wrote:
> The copy-on-read filter driver is applied to block-stream operations.
> The 'test_stream_parallel' in the file tests/qemu-iotests/030 runs
> jobs that use nodes for streaming in parallel through the backing chain.
> We've got filters being inserted to and removed from the backing chain
> while jobs are running. As a result, a filter node may be passed as the
> 'base' parameter to the stream_start() function when the base node name
> is not specified (the base node is identified by its file name which is
> the same to the related filter node).
> Another issue is that a function keeps the pointer to the filter BDS
> object that can be replaced and deleted after the co-routine switch.
> For example, the function backing_bs() returns the pointer to the
> backing BDS and the BDS reference counter is not incremented.
> A solution (or workaround) made with the given patch for block-stream
> job helps to pass all the iotests in the file tests/qemu-iotests/030.
> Any piece of advice how to amend the solution will be appreciated.
> I am looking forward to hearing from you.
So, in short, when filters comes to node-graph, we have two problems with stream job:
1. Searching node by filename works bad. It may (and I think, should) be workarounded
by using node-names and only node-names to select top and base node..
But should we, and how to support old scenarios with selecting nodes by filenames?
2. "base" works bad. Actually, job don't own base node, so it's illegal to keep pointer
to it. Base may change during the job.
So the best option, would be to use "bottom-node" concept instead of "base". If we don't want to
change qmp interface, we should calculate bottom-node from base at block-job creation time,
before any context switch, and keep pointer to bottom-node, instead of base.
Also, we should rewrite bdrv_block_status to support bottom_node instead of base, as again,
if caller owns only top and intermediate nodes, base may change during block_status calculation.
--
Best regards,
Vladimir
next prev parent reply other threads:[~2019-01-23 13:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 11:54 [Qemu-devel] [PATCH RFC 1/1] Stream block job involves copy-on-read filter Andrey Shinkevich
2019-01-23 13:10 ` Vladimir Sementsov-Ogievskiy [this message]
2019-01-31 14:02 ` Andrey Shinkevich
2019-02-08 13:13 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2019-02-08 15:29 ` Andrey Shinkevich
2019-02-11 14:07 ` Alberto Garcia
2019-02-11 14:51 ` Vladimir Sementsov-Ogievskiy
2019-02-11 15:52 ` Alberto Garcia
2019-02-11 16:58 ` Vladimir Sementsov-Ogievskiy
2019-02-12 11:35 ` Alberto Garcia
2019-02-14 13:43 ` Andrey Shinkevich
2019-02-18 10:08 ` Vladimir Sementsov-Ogievskiy
2019-02-20 9:10 ` Andrey Shinkevich
2019-02-11 14:54 ` Andrey Shinkevich
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=2436ebfb-9b1c-b88f-3512-5187f34cdf69@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=den@virtuozzo.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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).