qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: wenchao xia <xiaxia347os@163.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
	qemu-devel@nongnu.org, pbonzini@redhat.com,
	xiawenc@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH V7 0/4] libqblock qemu block layer library
Date: Mon, 15 Oct 2012 11:07:06 +0800	[thread overview]
Message-ID: <507B7DDA.10104@163.com> (raw)
In-Reply-To: <CAAu8pHt7Tqrcgz25dmA_y4hut+CeHyETpWi8cwrFV0x2T3vx0Q@mail.gmail.com>

于 2012-10-13 18:49, Blue Swirl 写道:
> On Sat, Oct 13, 2012 at 5:10 AM, Wenchao Xia <xiaxia347os@163.com> wrote:
>> From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>>
>>    These patches introduce libqblock API, make libqblock.la and make
>> check-libqblock could build this library.
>> Functionalities:
>>   1 create a new image.
>>   2 sync access of an image.
>>   3 basic image information retrieving such as backing file.
>>   4 detect if a sector is allocated in an image.
>> Supported Formats:
>>   ALL using file protocols.
>>
>> v2:
>>    Insert reserved bytes into union.
>>    Use uint64_t instead of size_t, offset.
>>    Use const char * in filename pointer.
>>    Initialization function removed and it was automatically executed when
>> library is loaded.
>>    Added compile flag visibility=hidden, to avoid name space pollution.
>>    Structure naming style changed.
>>    Using byte unit instead of sector for every API.
>>    Added a member in image static information structure, to report logical
>> sector size, which is always 512 now.
>>    Read and write API can take request not aligned to 512 now. It returns the
>> byte number that have succeed in operation, but now either negative value
>> or the number requested would be returned, because qemu block sync I/O API
>> would not return such number.
>>    Typo fix due to comments and improved documents.
>>
>> v3:
>>    Removed the code about OOM error, introduced GError.
>>    Used a table to map from string to enum types about format.
>>    Use typedef for every structure.
>>    Improved the gcc compiler macro to warn if gcc was not used.
>>    Global variable name changed with prefix libqb_.
>>    The struct QBlockStaticInfo was changed to folder full format related
>> information inside, and a new member with pointers pointing to the mostly used
>> members, such as backing file, virt size, was added. This would allow the user
>> to get full information about how it is created in the future.
>>    Each patch in the serial can work with qemu now.
>>    Typo fixes.
>>
>> v4:
>>    Renamed QBroker to QBlockContext.
>>    Removed tool objs out of libqblock.
>>    Added a check in initialization about structure size for ABI.
>>    Added a new helper API to duplicate protocol information, helps to open files
>> in a backing file chain.
>>    Check-libqblock will not rebuild libqblock every time now.
>>    Test case file renamed to "libqblock-[FMT].c".
>>    Test use gtest framework now.
>>    Test do random creation of test file now, added check for information API in
>> it.
>>    Test do random sync io instead of fixed offset io now.
>>    Test accept one parameter about where to place the test image, now it is
>> ./tests/libqblock/test_images.
>>
>> v5:
>>    Makefile of libqblock was adjusted to be similar as libcacard, added spec
>> file and install section.
>>    Removed warning when GCC was not found.
>>    Structure names were changed to better ones.
>>    Removed the union typedef that contain reserved bytes to reduce the folder
>> depth.
>>    Some format related enum options was changed to better name.
>>    Added accessors about image static information, hide indirect accessing
>> member detail in the structure.
>>    Test Makefile do not create diretory now, test case create it themself.
>>    Test build system do not use libtool now, and removed qtest-obj-y in its
>> dependency, make check will automatically execute test anyway now.
>>    Removed "ifeq ($(LIBTOOL),)" in Makefile.
>>
>> v6:
>>    Remove address pointer member in image static info structure.
>>
>> v7:
>>    Support out of tree building.
> 
> Still does not work:
>    lt CC libqblock/libqblock.lo
> In file included from /src/qemu/qemu-common.h:6,
>                   from /src/qemu/qemu-aio.h:17,
>                   from /src/qemu/block.h:4,
>                   from /src/qemu/libqblock/libqblock-internal.h:19,
>                   from /src/qemu/libqblock/libqblock.c:18:
> /src/qemu/compiler.h:6:25: error: config-host.h: No such file or directory
> 
  On my machine config-host.h was generated before in source code
directory, So I missed that. Fixed and tested again as following:
mkdir testbuild
cd testbuild
../configure
make libqblock
 Thanks for your sustained concern.

>>
>> Wenchao Xia (4):
>>    libqblock build system
>>    libqblock type defines
>>    libqblock API
>>    libqblock test example
>>
>>   .gitignore                        |    2 +
>>   Makefile                          |   14 +-
>>   block.c                           |    2 +-
>>   block.h                           |    1 +
>>   configure                         |    4 +-
>>   libqblock/Makefile                |   72 +++
>>   libqblock/libqblock-error.c       |   57 ++
>>   libqblock/libqblock-error.h       |   49 ++
>>   libqblock/libqblock-internal.h    |   75 +++
>>   libqblock/libqblock-types.h       |  252 ++++++++
>>   libqblock/libqblock.c             | 1191 +++++++++++++++++++++++++++++++++++++
>>   libqblock/libqblock.h             |  341 +++++++++++
>>   libqblock/libqblock.pc.in         |   13 +
>>   tests/Makefile                    |   36 ++-
>>   tests/libqblock/libqblock-qcow2.c |  392 ++++++++++++
>>   15 files changed, 2496 insertions(+), 5 deletions(-)
>>   create mode 100644 libqblock/Makefile
>>   create mode 100644 libqblock/libqblock-error.c
>>   create mode 100644 libqblock/libqblock-error.h
>>   create mode 100644 libqblock/libqblock-internal.h
>>   create mode 100644 libqblock/libqblock-types.h
>>   create mode 100644 libqblock/libqblock.c
>>   create mode 100644 libqblock/libqblock.h
>>   create mode 100644 libqblock/libqblock.pc.in
>>   create mode 100644 tests/libqblock/libqblock-qcow2.c
>>
>>
>>
> 

      reply	other threads:[~2012-10-15  3:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13  5:10 [Qemu-devel] [PATCH V7 0/4] libqblock qemu block layer library Wenchao Xia
2012-10-13  5:10 ` [Qemu-devel] [PATCH V7 1/4] libqblock build system Wenchao Xia
2012-10-13  5:10 ` [Qemu-devel] [PATCH V7 2/4] libqblock type defines Wenchao Xia
2012-10-14  5:01   ` [Qemu-devel] defferences between /usr/libexec/qemu-kvm and /usr/bin/qemu-system-x86_64 yue-kvm
2012-10-14  7:02     ` Michael Tokarev
2012-10-13  5:10 ` [Qemu-devel] [PATCH V7 3/4] libqblock API Wenchao Xia
2012-10-13  5:10 ` [Qemu-devel] [PATCH V7 4/4] libqblock test example Wenchao Xia
2012-10-13 10:49 ` [Qemu-devel] [PATCH V7 0/4] libqblock qemu block layer library Blue Swirl
2012-10-15  3:07   ` wenchao xia [this message]

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=507B7DDA.10104@163.com \
    --to=xiaxia347os@163.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).