From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/6] block: Add bdrv_refresh_filename()
Date: Wed, 20 Aug 2014 17:07:34 +0200 [thread overview]
Message-ID: <20140820150734.GH6122@noname.redhat.com> (raw)
In-Reply-To: <1405707901-8253-2-git-send-email-mreitz@redhat.com>
Am 18.07.2014 um 20:24 hat Max Reitz geschrieben:
> Some block devices may not have a filename in their BDS; and for some,
> there may not even be a normal filename at all. To work around this, add
> a function which tries to construct a valid filename for the
> BDS.filename field.
>
> If a filename exists or a block driver is able to reconstruct a valid
> filename (which is placed in BDS.exact_filename), this can directly be
> used.
>
> If no filename can be constructed, we can still construct an options
> QDict which is then converted to a JSON object and prefixed with the
> "json:" pseudo protocol prefix. The QDict is placed in
> BDS.full_open_options.
>
> For most block drivers, this process can be done automatically; those
> that need special handling may define a .bdrv_refresh_filename() method
> to fill BDS.exact_filename and BDS.full_open_options themselves.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> In this version, bdrv_refresh_filename() leaves the filename unmodified
> if neither a new filename nor an options QDict can be generated. Another
> idea would be to clear the filename in this case as it is probably
> obsolete then. I was not sure which to pick, so I just used the first
> version I wrote.
To be honest, many things in this patch don't feel quite right. This
isn't necessarily your fault, I can imagine that the infrastructure is
just lacking the right properties for you to use.
My hope is that soon bs->options would be the only BDS field keeping
configuration information and that bs->filename would go away. Now with
this patch series we get both of them duplicated instead. I'm not quite
sure if this is progress, but it may still be an acceptable intermediate
step.
Kevin
next prev parent reply other threads:[~2014-08-20 15:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 18:24 [Qemu-devel] [PATCH 0/6] block: Let drivers reconstruct the filename Max Reitz
2014-07-18 18:24 ` [Qemu-devel] [PATCH 1/6] block: Add bdrv_refresh_filename() Max Reitz
2014-08-20 15:07 ` Kevin Wolf [this message]
2014-08-20 19:06 ` Max Reitz
2014-08-21 8:26 ` Kevin Wolf
2014-07-18 18:24 ` [Qemu-devel] [PATCH 2/6] blkdebug: Implement bdrv_refresh_filename() Max Reitz
2014-08-20 15:14 ` Kevin Wolf
2014-08-20 19:08 ` Max Reitz
2014-07-18 18:24 ` [Qemu-devel] [PATCH 3/6] blkverify: " Max Reitz
2014-07-18 18:24 ` [Qemu-devel] [PATCH 4/6] nbd: " Max Reitz
2014-07-18 18:25 ` [Qemu-devel] [PATCH 5/6] quorum: " Max Reitz
2014-07-18 18:25 ` [Qemu-devel] [PATCH 6/6] iotests: Add test for image filename construction Max Reitz
2014-08-15 15:22 ` [Qemu-devel] [PATCH 0/6] block: Let drivers reconstruct the filename Max Reitz
2014-08-20 15:29 ` Kevin Wolf
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=20140820150734.GH6122@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).