[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_f
From: |
Hu Tao |
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: |
Wed, 6 Aug 2014 09:26:51 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Aug 05, 2014 at 05:47:03AM -0600, Eric Blake wrote:
> 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.
Right. v5 is coming soon.
Regards,
Hu
- [Qemu-devel] [PATCH v4 0/6] bug fixs for memory backend, Hu Tao, 2014/08/05
- [Qemu-devel] [PATCH v4 2/6] exec: improve error handling and reporting in file_ram_alloc() and gethugepagesize(), Hu Tao, 2014/08/05
- [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
- [Qemu-devel] [PATCH v4 5/6] rename memory_region_init_ram_ptr to memory_region_init_ram_ptr_nofail, Hu Tao, 2014/08/05
- [Qemu-devel] [PATCH v4 6/6] rename memory_region_init_ram_ptr_may_fail to memory_region_init_ram_ptr, Hu Tao, 2014/08/05
- [Qemu-devel] [PATCH v4 4/6] rename memory_region_init_ram_may_fail to memory_region_init_ram, Hu Tao, 2014/08/05
- [Qemu-devel] [PATCH v4 3/6] rename memory_region_init_ram to memory_region_init_ram_nofail, Hu Tao, 2014/08/05