From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: 'Fabiano Rosas' <farosas@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, kwolf@redhat.com, mreitz@redhat.com,
'Pavel Dovgalyuk' <pavel.dovgaluk@ispras.ru>,
'Paolo Bonzini' <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/5] block/blkreplay: Remove protocol-related fields
Date: Mon, 12 Mar 2018 11:05:10 +0300 [thread overview]
Message-ID: <000601d3b9d8$d7d129c0$87737d40$@ru> (raw)
In-Reply-To: <20180309182202.31206-5-farosas@linux.vnet.ibm.com>
> From: Fabiano Rosas [mailto:farosas@linux.vnet.ibm.com]
> The blkreplay driver is not a protocol so it should implement bdrv_open
> instead of bdrv_file_open and not provide a protocol_name.
>
> Attempts to invoke this driver using protocol syntax
> (i.e. blkreplay:<filename:options:...>) will now fail gracefully:
>
> $ qemu-img info blkreplay:foo
> qemu-img: Could not open 'blkreplay:foo': Unknown protocol 'blkreplay'
>
> Signed-off-by: Fabiano Rosas <farosas@linux.vnet.ibm.com>
> ---
> block/blkreplay.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/block/blkreplay.c b/block/blkreplay.c
> index 61e44a1949..fe5a9b4a98 100755
> --- a/block/blkreplay.c
> +++ b/block/blkreplay.c
> @@ -129,10 +129,9 @@ static int coroutine_fn blkreplay_co_flush(BlockDriverState *bs)
>
> static BlockDriver bdrv_blkreplay = {
> .format_name = "blkreplay",
> - .protocol_name = "blkreplay",
> .instance_size = 0,
>
> - .bdrv_file_open = blkreplay_open,
> + .bdrv_open = blkreplay_open,
> .bdrv_close = blkreplay_close,
> .bdrv_child_perm = bdrv_filter_default_perms,
> .bdrv_getlength = blkreplay_getlength,
> --
> 2.13.6
Reviewed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Pavel Dovgalyuk
next prev parent reply other threads:[~2018-03-12 8:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 18:21 [Qemu-devel] [PATCH 0/5] block: Ensure non-protocol drivers can only be selected explicitly Fabiano Rosas
2018-03-09 18:21 ` [Qemu-devel] [PATCH 1/5] block/replication: Remove protocol_name field Fabiano Rosas
2018-03-12 13:41 ` Max Reitz
2018-03-09 18:21 ` [Qemu-devel] [PATCH 2/5] block/quorum: Remove protocol-related fields Fabiano Rosas
2018-03-12 13:44 ` Max Reitz
2018-03-09 18:21 ` [Qemu-devel] [PATCH 3/5] block/throttle: " Fabiano Rosas
2018-03-12 13:44 ` Max Reitz
2018-03-09 18:22 ` [Qemu-devel] [PATCH 4/5] block/blkreplay: " Fabiano Rosas
2018-03-12 8:05 ` Pavel Dovgalyuk [this message]
2018-03-12 13:45 ` Max Reitz
2018-03-09 18:22 ` [Qemu-devel] [PATCH 5/5] include/block/block_int: Document protocol related functions Fabiano Rosas
2018-03-12 13:50 ` Max Reitz
2018-03-12 22:26 ` Fabiano Rosas
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='000601d3b9d8$d7d129c0$87737d40$@ru' \
--to=dovgaluk@ispras.ru \
--cc=farosas@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pavel.dovgaluk@ispras.ru \
--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).