From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: wei.liu2@citrix.com, xen-devel@lists.xen.org,
ian.jackson@eu.citrix.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one
Date: Fri, 21 Nov 2014 09:47:13 -0500 [thread overview]
Message-ID: <546F5071.5070607@oracle.com> (raw)
In-Reply-To: <1416569185.20516.8.camel@Abyss>
On 11/21/2014 06:26 AM, Dario Faggioli wrote:
> On Thu, 2014-11-20 at 16:27 -0500, Boris Ostrovsky wrote:
>
>> diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
>> index 58df4f3..2a08bef 100644
>> --- a/tools/libxl/libxl_utils.c
>> +++ b/tools/libxl/libxl_utils.c
>> @@ -614,6 +614,13 @@ void libxl_bitmap_copy(libxl_ctx *ctx, libxl_bitmap *dptr,
>> memcpy(dptr->map, sptr->map, sz * sizeof(*dptr->map));
>> }
>>
>> +void libxl_bitmap_copy_partial(libxl_ctx *ctx, libxl_bitmap *dptr,
>> + const libxl_bitmap *sptr)
>> +{
>> + assert(dptr->size >= sptr->size);
>> + memcpy(dptr->map, sptr->map, sptr->size * sizeof(*dptr->map));
>> +}
>> +
> Looking at other callers of libxl_bitmap_copy(), I think something like
> this makes sense for pretty much all of them.
>
> And even abstracting from them, and thinking to how a function like
> 'libxl_bitmap_copy()' this should behave, copying only the "common part"
> makes sense to me.
>
> So, should we make libxl_bitmap_copy() behave like implemented above,
> rather than introducing a new function. I know this is public stable
> API, but I think this is a fine behavioral change, isn't it?
I did consider this but wasn't sure about it from the point of view of
API behavior. If people feel it's OK to slightly change behavior here
I'd rather go this route.
-boris
next prev parent reply other threads:[~2014-11-21 14:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 21:27 [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one Boris Ostrovsky
2014-11-21 11:12 ` Wei Liu
2014-11-21 14:43 ` Boris Ostrovsky
2014-11-21 11:26 ` Dario Faggioli
2014-11-21 14:47 ` Boris Ostrovsky [this message]
2014-11-24 10:41 ` Wei Liu
2014-11-24 10:47 ` Wei Liu
2014-11-24 15:48 ` Boris Ostrovsky
2014-11-25 9:42 ` Dario Faggioli
2014-11-25 9:48 ` Wei Liu
2014-11-25 10:39 ` Wei Liu
2014-11-25 11:15 ` Wei Liu
2014-11-25 11:41 ` Dario Faggioli
2014-11-25 14:57 ` Boris Ostrovsky
2014-11-25 15:54 ` Konrad Rzeszutek Wilk
2014-11-28 12:10 ` Ian Campbell
2014-11-26 12:51 ` Ian Campbell
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=546F5071.5070607@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.