From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v5 3/6] block: Add bdrv_filename()
Date: Mon, 19 Oct 2015 14:52:04 -0600 [thread overview]
Message-ID: <562557F4.3030900@redhat.com> (raw)
In-Reply-To: <1445280546-26226-4-git-send-email-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]
On 10/19/2015 12:49 PM, Max Reitz wrote:
> Split the part which actually refreshes the BlockDriverState.filename
> field off of bdrv_refresh_filename() into a more generic function
> bdrv_filename(), which first calls bdrv_refresh_filename() and then
> stores a qemu-usable filename in the given buffer instead of
> BlockDriverState.filename.
>
> Since bdrv_refresh_filename() therefore no longer refreshes that field,
> some calls to that function have to be replaced by calls to
> bdrv_filename() "manually" refreshing the BDS filename field (this is
> only temporary).
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> block.c | 43 ++++++++++++++++++++++++++++++++++++-------
> block/blkverify.c | 3 ++-
> block/quorum.c | 3 ++-
> include/block/block.h | 1 +
> 4 files changed, 41 insertions(+), 9 deletions(-)
>
> +
> +/* First refreshes exact_filename and full_open_options by calling
> + * bdrv_refresh_filename(). Then, if exact_filename is set, it is copied into
> + * the target buffer. Otherwise, full_open_options is converted to a JSON
> + * object, prefixed with "json:" (for use through the JSON pseudo protocol) and
> + * put there.
> + *
> + * If @sz > 0, the string put into the buffer will always be null-terminated.
Maybe add a warning:
...always be null-terminated, even if this truncates the result.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-10-19 20:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 18:49 [Qemu-devel] [PATCH v5 0/6] block: Drop BDS.filename Max Reitz
2015-10-19 18:49 ` [Qemu-devel] [PATCH v5 1/6] block: Change bdrv_get_encrypted_filename() Max Reitz
2015-10-19 20:15 ` Eric Blake
2015-10-26 18:20 ` Kevin Wolf
2015-10-19 18:49 ` [Qemu-devel] [PATCH v5 2/6] block: Avoid BlockDriverState.filename Max Reitz
2015-10-19 20:35 ` Eric Blake
2015-10-26 16:51 ` Kevin Wolf
2015-10-19 18:49 ` [Qemu-devel] [PATCH v5 3/6] block: Add bdrv_filename() Max Reitz
2015-10-19 20:52 ` Eric Blake [this message]
2015-10-26 18:20 ` Kevin Wolf
2015-10-19 18:49 ` [Qemu-devel] [PATCH v5 4/6] qemu-img: Use bdrv_filename() for map Max Reitz
2015-10-19 21:02 ` Eric Blake
2015-10-26 18:21 ` Kevin Wolf
2015-10-19 18:49 ` [Qemu-devel] [PATCH v5 5/6] block: Drop BlockDriverState.filename Max Reitz
2015-10-19 21:11 ` Eric Blake
2015-10-27 9:39 ` Kevin Wolf
2015-10-19 18:49 ` [Qemu-devel] [PATCH v5 6/6] iotests: Test changed Quorum filename Max Reitz
2015-10-19 21:13 ` Eric Blake
2015-10-27 9:41 ` 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=562557F4.3030900@redhat.com \
--to=eblake@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).