All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Junyan He <junyan.he@intel.com>,
	Haozhong Zhang <haozhong.zhang@intel.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PULL 4/7] hostmem-file: add the 'pmem' option
Date: Fri, 24 Aug 2018 17:57:06 +0100	[thread overview]
Message-ID: <CAFEAcA8d0TMqkmkVY9mANj+Dv9fZj18ov=nvaDNtKqss5Nmc+w@mail.gmail.com> (raw)
In-Reply-To: <20180824195231-mutt-send-email-mst@kernel.org>

On 24 August 2018 at 17:53, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Fri, Aug 24, 2018 at 04:13:18PM +0100, Peter Maydell wrote:
>> object_get_canonical_path_component() returns a string which
>> must be freed using g_free().

> Like the following? Junyan, could you pls try this one and confirm?
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
> index 2476dcb435..d88125b86e 100644
> --- a/backends/hostmem-file.c
> +++ b/backends/hostmem-file.c
> @@ -154,11 +154,14 @@ static void file_memory_backend_set_pmem(Object *o, bool value, Error **errp)
>  #ifndef CONFIG_LIBPMEM
>      if (value) {
>          Error *local_err = NULL;
> +        char *path = object_get_canonical_path_component(o);
> +
>          error_setg(&local_err,
>                     "Lack of libpmem support while setting the 'pmem=on'"
>                     " of %s '%s'. We can't ensure data persistence.",
>                     object_get_typename(o),
> -                   object_get_canonical_path_component(o));
> +                   );
> +        g_free(path);
>          error_propagate(errp, local_err);
>          return;

Yep, like that (though I would put the closing ");" on
the line with object_get_typename() and delete the trailing comma).

thanks
-- PMM

  reply	other threads:[~2018-08-24 16:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 20:24 [Qemu-devel] [PULL 0/7] pc: fixes Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 1/7] memory, exec: Expose all memory block related flags Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 2/7] memory, exec: switch file ram allocation functions to 'flags' parameters Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 3/7] configure: add libpmem support Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 4/7] hostmem-file: add the 'pmem' option Michael S. Tsirkin
2018-08-24 15:13   ` Peter Maydell
2018-08-24 16:53     ` Michael S. Tsirkin
2018-08-24 16:57       ` Peter Maydell [this message]
2018-08-24 17:14         ` Michael S. Tsirkin
2018-08-28 15:42           ` Yi Zhang
2018-08-20 20:24 ` [Qemu-devel] [PULL 5/7] mem/nvdimm: ensure write persistence to PMEM in label emulation Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 6/7] migration/ram: Add check and info message to nvdimm post copy Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 7/7] migration/ram: ensure write persistence on loading all data to PMEM Michael S. Tsirkin
2018-08-21 10:35 ` [Qemu-devel] [PULL 0/7] pc: fixes Peter Maydell

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='CAFEAcA8d0TMqkmkVY9mANj+Dv9fZj18ov=nvaDNtKqss5Nmc+w@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=crosthwaite.peter@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=haozhong.zhang@intel.com \
    --cc=imammedo@redhat.com \
    --cc=junyan.he@intel.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.