[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2 |
Date: |
Thu, 9 Aug 2012 17:12:11 +0000 |
On Thu, Aug 9, 2012 at 10:10 AM, Wenchao Xia <address@hidden> wrote:
> This patch intrudce libqblock API, libqblock-test is used as a test case.
>
> V2:
> Using struct_size and [xxx]_new [xxx]_free to keep ABI.
> Using embbed structure to class format options in image creating.
> Format specific options were brought to surface.
> Image format was changed to enum interger instead of string.
> Some API were renamed.
> Internel error with errno was saved and with an API caller can get it.
> ALL flags used were defined in libqblock.h.
>
> Something need discuss:
> Embbed structure or union could make the model more friendly, but that
> make ABI more difficult, because we need to check every embbed structure's
> size and guess compiler's memory arrangement. This means #pragma pack(4)
> or struct_size, offset_next in every structure. Any better way to solve it?
> or make every structure a plain one?
I'd still use accessor functions instead of structure passing, it
would avoid these problems.
Packing can even introduce a new set of problems since we don't
control the CFLAGS of the client of the library.
> AIO is missing, need a prototype.
>
> Wenchao Xia (3):
> adding libqblock
> libqblock API
> libqblock test case
>
> Makefile | 3 +
> block.c | 2 +-
> block.h | 1 +
> libqblock-test.c | 197 ++++++++++++++++
> libqblock.c | 670
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> libqblock.h | 447 ++++++++++++++++++++++++++++++++++++
> 6 files changed, 1319 insertions(+), 1 deletions(-)
> create mode 100644 libqblock-test.c
> create mode 100644 libqblock.c
> create mode 100644 libqblock.h
>
>
>
- [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Wenchao Xia, 2012/08/09
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2,
Blue Swirl <=
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Wenchao Xia, 2012/08/10
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Blue Swirl, 2012/08/11
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Wenchao Xia, 2012/08/13
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Blue Swirl, 2012/08/13
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Wenchao Xia, 2012/08/14
- Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2, Blue Swirl, 2012/08/14