qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
	blauwirbel@gmail.com, pbonzini@redhat.com, eblake@redhat.com,
	Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH V3 0/5] libqblock qemu block layer library
Date: Tue, 18 Sep 2012 17:01:54 +0800	[thread overview]
Message-ID: <1347958919-30380-1-git-send-email-xiawenc@linux.vnet.ibm.com> (raw)

  This patch 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.

Wenchao Xia (5):
  libqblock build system
  libqblock type defines
  libqblock API
  libqblock test build system
  libqblock test example code

 .gitignore                       |    1 +
 Makefile                         |   14 +-
 Makefile.objs                    |    6 +
 block.c                          |    2 +-
 block.h                          |    1 +
 libqblock/Makefile               |   64 +++
 libqblock/libqblock-error.c      |   57 ++
 libqblock/libqblock-error.h      |   49 ++
 libqblock/libqblock-internal.h   |   56 ++
 libqblock/libqblock-types.h      |  268 +++++++++
 libqblock/libqblock.c            | 1140 ++++++++++++++++++++++++++++++++++++++
 libqblock/libqblock.h            |  297 ++++++++++
 tests/Makefile                   |    3 +
 tests/libqblock/Makefile         |   32 ++
 tests/libqblock/libqblock-test.c |  237 ++++++++
 15 files changed, 2225 insertions(+), 2 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 tests/libqblock/Makefile
 create mode 100644 tests/libqblock/libqblock-test.c

             reply	other threads:[~2012-09-18  9:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  9:01 Wenchao Xia [this message]
2012-09-18  9:01 ` [Qemu-devel] [PATCH V3 1/5] libqblock build system Wenchao Xia
2012-09-18 10:05   ` Paolo Bonzini
2012-09-19  6:35     ` Wenchao Xia
2012-09-19  9:57       ` Paolo Bonzini
2012-09-27  2:15         ` Wenchao Xia
2012-09-27  7:14           ` Paolo Bonzini
2012-09-18 10:31   ` Paolo Bonzini
2012-09-18  9:01 ` [Qemu-devel] [PATCH V3 2/5] libqblock type defines Wenchao Xia
2012-09-18 10:05   ` Paolo Bonzini
2012-09-19  3:23     ` Wenchao Xia
2012-09-18  9:01 ` [Qemu-devel] [PATCH V3 3/5] libqblock API Wenchao Xia
2012-09-18  9:01 ` [Qemu-devel] [PATCH V3 4/5] libqblock test build system Wenchao Xia
2012-09-18 10:10   ` Paolo Bonzini
2012-09-19  6:39     ` Wenchao Xia
2012-09-18  9:01 ` [Qemu-devel] [PATCH V3 5/5] libqblock test example code Wenchao Xia
2012-09-18 10:10   ` Paolo Bonzini
2012-09-19  6:40     ` Wenchao Xia

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=1347958919-30380-1-git-send-email-xiawenc@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).