All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Hu Tao <hutao@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_fail() and memory_region_init_ram_ptr_may_fail()
Date: Tue, 05 Aug 2014 05:47:03 -0600	[thread overview]
Message-ID: <53E0C437.6020607@redhat.com> (raw)
In-Reply-To: <b38b14c6fe653aa0123a61dbd5a32cc75dc123fe.1407206291.git.hutao@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

On 08/04/2014 11:56 PM, Hu Tao wrote:
> These two are almost the same as memory_region_init_ram() and
> memory_region_init_ram_ptr() except that they have an extra errp
> parameter to let callers handle error. The purpose is to fix the bug
> described below.
> 
> We should have added errp directly to memory_region_ram(), but that
> mixes updates to calls to memory_region_ram() and this bug fix and make
> it hard to review.
> 
> We will rename _may_fail variants later so that we will have two versions
> of API: one with errp parameter(memory_region_init_ram(),
> memory_region_init_ram_ptr()), one without errp parameter and with
> suffix _nofail.

That feels like overkill.  Every caller that calls the _nofail variant
can instead call memory_region_init_ram(..., &error_abort), and then you
don't need the _nofail version.

-- 
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: 539 bytes --]

  reply	other threads:[~2014-08-05 11:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  5:56 [Qemu-devel] [PATCH v4 0/6] bug fixs for memory backend Hu Tao
2014-08-05  5:56 ` [Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_fail() and memory_region_init_ram_ptr_may_fail() Hu Tao
2014-08-05 11:47   ` Eric Blake [this message]
2014-08-06  1:26     ` Hu Tao
2014-08-05  5:56 ` [Qemu-devel] [PATCH v4 2/6] exec: improve error handling and reporting in file_ram_alloc() and gethugepagesize() Hu Tao
2014-08-05  5:56 ` [Qemu-devel] [PATCH v4 3/6] rename memory_region_init_ram to memory_region_init_ram_nofail Hu Tao
2014-08-05  6:42   ` Peter Crosthwaite
2014-08-05  7:05     ` Hu Tao
2014-08-05 22:29       ` Peter Crosthwaite
2014-08-05  5:56 ` [Qemu-devel] [PATCH v4 4/6] rename memory_region_init_ram_may_fail to memory_region_init_ram Hu Tao
2014-08-05  5:56 ` [Qemu-devel] [PATCH v4 5/6] rename memory_region_init_ram_ptr to memory_region_init_ram_ptr_nofail Hu Tao
2014-08-05  5:56 ` [Qemu-devel] [PATCH v4 6/6] rename memory_region_init_ram_ptr_may_fail to memory_region_init_ram_ptr Hu Tao

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=53E0C437.6020607@redhat.com \
    --to=eblake@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --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 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.