[libvirt] [PATCH v2 2/9] New functions for virBitmap
Hu Tao
hutao at cn.fujitsu.com
Fri Sep 7 07:35:32 UTC 2012
On Thu, Sep 06, 2012 at 11:23:49PM -0600, Eric Blake wrote:
> On 09/06/2012 11:17 PM, Eric Blake wrote:
> > On 09/06/2012 04:13 AM, Hu Tao wrote:
> >> In many places we store bitmap info in a chunk of data
> >> (pointed to by a char *), and have redundant codes to
> >> set/unset bits. This patch extends virBitmap, and convert
> >> those codes to use virBitmap in subsequent patches.
> >> ---
> >
> >>
> >> struct _virBitmap {
> >> - size_t size;
> >> - unsigned long *map;
> >> + size_t size; /* size in bits */
> >> + size_t size2; /* size in LONGs */
> >
> > The name 'size2' isn't very descriptive. Maybe we should rename to
> > s/size/max_bit/ and s/size2/map_len/ for easier reading?
>
> If you go with the rename idea, then I'd split this into two patches -
> one that introduces the new field and names and retrofits all existing
> functions, but adds no new code other than the use of the new field; and
> the second that only adds the new functions.
OK.
--
Thanks,
Hu Tao
More information about the libvir-list
mailing list