Statistics
| Branch: | Revision:

root / include / block @ d5124c00

Name Size
aio.h 9 kB
block.h 18.7 kB
block_int.h 16.5 kB
blockjob.h 8.2 kB
coroutine.h 5.9 kB
coroutine_int.h 1.9 kB
nbd.h 3.3 kB
qapi.h 2 kB
scsi.h 10.7 kB
snapshot.h 2.9 kB
thread-pool.h 1.1 kB

Latest revisions

# Date Author Comment
d5124c00 09/12/2013 11:12 am Max Reitz

bdrv: Use "Error" for creating images

Add an Error ** parameter to BlockDriver.bdrv_create to allow more
specific error messages.

Signed-off-by: Max Reitz <>

2ea1dd75 09/12/2013 11:12 am Wenchao Xia

snapshot: new function bdrv_snapshot_find_by_id_and_name()

To make it clear about id and name in searching, add this API
to distinguish them. Caller can choose to search by id or name,
*errp will be set only for exception.

Some code are modified based on Pavel's patch....

a89d89d3 09/12/2013 11:12 am Wenchao Xia

snapshot: distinguish id and name in snapshot delete

Snapshot creation actually already distinguish id and name since it take
a structured parameter *sn, but delete can't. Later an accurate delete
is needed in qmp_transaction abort and blockdev-snapshot-delete-sync,...

015a1036 09/12/2013 11:12 am Max Reitz

bdrv: Use "Error" for opening images

Add an Error ** parameter to BlockDriver.bdrv_open and
BlockDriver.bdrv_file_open to allow more specific error messages.

Signed-off-by: Max Reitz <>

6f176b48 09/12/2013 11:12 am Max Reitz

block: Image file option amendment

This patch adds the "amend" option to qemu-img which allows changing
image options on existing image files. It also adds the generic bdrv
implementation which is basically just a wrapper for the image format
specific function....

4f578637 09/06/2013 04:25 pm Paolo Bonzini

block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction

Now that bdrv_is_allocated detects coroutine context, the two can
use the same code.

Reviewed-by: Eric Blake <>
Signed-off-by: Paolo Bonzini <>...

b6b8a333 09/06/2013 04:25 pm Paolo Bonzini

block: introduce bdrv_get_block_status API

For now, bdrv_get_block_status is just another name for bdrv_is_allocated.
The next patches will add more flags.

This also touches all block drivers with a mostly mechanical rename. The
sole exception is cow; because it calls cow_co_is_allocated from the read...

4333bb71 09/06/2013 04:25 pm Paolo Bonzini

block: define get_block_status return value

Define the return value of get_block_status. Bits 0, 1, 2 and 9-62
are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-8
are left for future extensions.

The return code is compatible with the old is_allocated API: if a driver...

4f6fd349 09/06/2013 04:25 pm Fam Zheng

block: make bdrv_delete() static

Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is no
longer public and should be called by bdrv_unref() if refcnt is
decreased to 0.

This is an identical change because effectively, there's no multiple
reference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets...

bdad13b9 09/06/2013 04:25 pm Paolo Bonzini

block: make bdrv_co_is_allocated static

bdrv_is_allocated can detect coroutine context and go through a fast
path, similar to other block layer functions.

Reviewed-by: Eric Blake <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

View revisions

Also available in: Atom