Statistics
| Branch: | Revision:

root / block @ b6b8a333

Name Size
Makefile.objs 916 Bytes
backup.c 11.8 kB
blkdebug.c 17.5 kB
blkverify.c 11.7 kB
bochs.c 7.1 kB
cloop.c 5.9 kB
commit.c 7.3 kB
cow.c 10.6 kB
curl.c 18.5 kB
dmg.c 10.3 kB
gluster.c 18.9 kB
iscsi.c 36.3 kB
linux-aio.c 5.2 kB
mirror.c 18.8 kB
nbd.c 18.7 kB
parallels.c 4.8 kB
qapi.c 16.3 kB
qcow.c 27.9 kB
qcow2-cache.c 8.4 kB
qcow2-cluster.c 44.7 kB
qcow2-refcount.c 58.8 kB
qcow2-snapshot.c 19.3 kB
qcow2.c 56 kB
qcow2.h 15 kB
qed-check.c 6.5 kB
qed-cluster.c 5.1 kB
qed-gencb.c 688 Bytes
qed-l2-cache.c 5.9 kB
qed-table.c 8.4 kB
qed.c 46.1 kB
qed.h 10.8 kB
raw-aio.h 1.6 kB
raw-posix.c 49.6 kB
raw-win32.c 16.9 kB
raw_bsd.c 5.7 kB
rbd.c 25.9 kB
sheepdog.c 63.8 kB
snapshot.c 4.1 kB
ssh.c 29 kB
stream.c 6.9 kB
vdi.c 24.8 kB
vhdx.c 30.4 kB
vhdx.h 14.8 kB
vmdk.c 54.6 kB
vpc.c 23.7 kB
vvfat.c 84.5 kB
win32-aio.c 5.7 kB

Latest revisions

# Date Author Comment
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 <>...

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

block: expect errors from bdrv_co_is_allocated

Some bdrv_is_allocated callers do not expect errors, but the fallback
in qcow2.c might make other callers trip on assertion failures or
infinite loops.

Fix the callers to always look for errors.

Cc: ...

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

3d34c6cd 09/06/2013 04:25 pm Fam Zheng

vvfat: use bdrv_new() to allocate BlockDriverState

we need bdrv_new() to properly initialize BDS, don't allocate memory
manually.

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

13c91cb7 09/06/2013 04:25 pm Fam Zheng

iscsi: use bdrv_new() instead of stack structure

BlockDriverState structure needs bdrv_new() to initialize refcnt, don't
allocate a local structure variable and memset to 0, becasue with coming
refcnt implementation, bdrv_unref will crash if bs->refcnt not...

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

276cbc7f 09/06/2013 04:25 pm Paolo Bonzini

cow: make reads go at a decent speed

Do not do two reads for each sector; load each sector of the bitmap
and use bitmap operations to process it.

Writes are still dog slow!

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

26ae9804 09/06/2013 04:25 pm Paolo Bonzini

cow: make writes go at a less indecent speed

Only sync once per write, rather than once per sector.

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

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

cow: do not call bdrv_co_is_allocated

As we change bdrv_is_allocated to gather more information from bs and
bs->file, it will become a bit slower. It is still appropriate for online
jobs, but not for reads/writes. Call the internal function instead.

Reviewed-by: Eric Blake <>...

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