Statistics
| Branch: | Revision:

root / block @ 9e0e2f96

Name Size
blkdebug.c 12.7 kB
blkverify.c 10.2 kB
bochs.c 7 kB
cloop.c 5.3 kB
cow.c 9.4 kB
curl.c 16.3 kB
dmg.c 8.7 kB
nbd.c 7.6 kB
parallels.c 4.8 kB
qcow.c 25.8 kB
qcow2-cache.c 7.5 kB
qcow2-cluster.c 27.9 kB
qcow2-refcount.c 37.8 kB
qcow2-snapshot.c 13.5 kB
qcow2.c 37 kB
qcow2.h 7.8 kB
qed-check.c 5.4 kB
qed-cluster.c 5.1 kB
qed-gencb.c 688 Bytes
qed-l2-cache.c 5.4 kB
qed-table.c 8.7 kB
qed.c 43.3 kB
qed.h 10.6 kB
raw-posix-aio.h 1.3 kB
raw-posix.c 31.7 kB
raw-win32.c 11.5 kB
raw.c 3.4 kB
rbd.c 21.8 kB
sheepdog.c 53.6 kB
vdi.c 29.9 kB
vmdk.c 45.1 kB
vpc.c 18.9 kB
vvfat.c 80.1 kB

Latest revisions

# Date Author Comment
2914caa0 10/21/2011 06:34 pm Paolo Bonzini

block: take lock around bdrv_read implementations

This does the first part of the conversion to coroutines, by
wrapping bdrv_read implementations to take the mutex.

Drivers that implement bdrv_read rather than bdrv_co_readv can
then benefit from asynchronous operation (at least if the underlying...

e183ef75 10/21/2011 06:34 pm Paolo Bonzini

block: take lock around bdrv_write implementations

This does the first part of the conversion to coroutines, by
wrapping bdrv_write implementations to take the mutex.

Drivers that implement bdrv_write rather than bdrv_co_writev can
then benefit from asynchronous operation (at least if the underlying...

8b94ff85 10/21/2011 06:34 pm Paolo Bonzini

block: change flush to co_flush

Since coroutine operation is now mandatory, convert all bdrv_flush
implementations to coroutines. For qcow2, this means taking the lock.
Other implementations are simpler and just forward bdrv_flush to the
underlying protocol, so they can avoid the lock....

6db39ae2 10/21/2011 06:34 pm Paolo Bonzini

block: change discard to co_discard

Since coroutine operation is now mandatory, convert both bdrv_discard
implementations to coroutines. For qcow2, this means taking the lock
around the operation. raw-posix remains synchronous.

The bdrv_discard callback is then unused and can be eliminated....

6f6dc656 10/21/2011 06:34 pm Stefan Hajnoczi

block: drop redundant bdrv_flush implementation

Block drivers now only need to provide either of .bdrv_co_flush,
.bdrv_aio_flush() or for legacy drivers .bdrv_flush(). Remove
the redundant .bdrv_flush() implementations.

[Paolo Bonzini: change raw driver to bdrv_co_flush]...

4265d620 10/21/2011 06:34 pm Paolo Bonzini

block: add bdrv_co_discard and bdrv_aio_discard support

This similarly adds support for coroutine and asynchronous discard.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

8f1efd00 10/21/2011 06:34 pm Kevin Wolf

qcow2: Fix bdrv_write_compressed error handling

If during allocation of compressed clusters the cluster was already allocated
uncompressed, fail and properly release the l2_table (the latter avoids a
failed assertion).

While at it, make it return some real error numbers instead of -1....

588b65a3 10/21/2011 06:34 pm Paolo Bonzini

vmdk: fix return values of vmdk_parent_open

While vmdk_open_desc_file (touched by the patch) correctly changed -1
to -EINVAL, vmdk_open did not. Fix it directly in vmdk_parent_open.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

bae0a0cc 10/21/2011 06:34 pm Paolo Bonzini

vmdk: clean up open

Move vmdk_parent_open to vmdk_open. There's another path how
vmdk_parent_open can be reached:

vmdk_parse_extents() ->  vmdk_open_sparse() ->  vmdk_open_vmdk4() ->
vmdk_open_desc_file().

If that can happen, however, the code is bogus. vmdk_parent_open...

848c66e8 10/21/2011 06:34 pm Paolo Bonzini

block: add a CoMutex to synchronous read drivers

The big conversion of bdrv_read/write to coroutines caused the two
homonymous callbacks in BlockDriver to become reentrant. It goes
like this:

1) bdrv_read is now called in a coroutine, and calls bdrv_read or...

View revisions

Also available in: Atom