Statistics
| Branch: | Revision:

root / block @ c4d9d196

# Date Author Comment
c4d9d196 03/15/2013 05:07 pm Stefan Hajnoczi

threadpool: drop global thread pool

Now that each AioContext has a ThreadPool and the main loop AioContext
can be fetched with bdrv_get_aio_context(), we can eliminate the concept
of a global thread pool from thread-pool.c.

The submit functions must take a ThreadPool* argument....

f6977f15 03/15/2013 05:07 pm Stefan Hajnoczi

qcow2: flush refcount cache correctly in qcow2_write_snapshots()

Since qcow2 metadata is cached we need to flush the caches, not just the
underlying file. Use bdrv_flush(bs) instead of bdrv_flush(bs->file).

Also add the error return path when bdrv_flush() fails and move the...

c1f5bafd 03/15/2013 05:07 pm Stefan Hajnoczi

qcow2: set L2 cache dependency in qcow2_alloc_bytes()

Compressed writes use qcow2_alloc_bytes() to allocate space with byte
granularity. The affected clusters' refcounts will be incremented but
we do not need to flush yet.

Set a L2 cache dependency on the refcount block cache, so that the...

2154f24e 03/15/2013 05:07 pm Stefan Hajnoczi

qcow2: flush in qcow2_update_snapshot_refcount()

Users of qcow2_update_snapshot_refcount() do not flush consistently.
qcow2_snapshot_create() flushes but qcow2_snapshot_goto() and
qcow2_snapshot_delete() do not.

Solve this by moving the bdrv_flush() into...

f9cb2860 03/15/2013 05:07 pm Stefan Hajnoczi

qcow2: drop flush in update_cluster_refcount()

The update_cluster_refcount() function increments/decrements a cluster's
refcount and then returns the new refcount value.

There is no need to flush since both update_cluster_refcount() callers
already take care of this:...

36479179 03/15/2013 05:07 pm Stefan Hajnoczi

qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount()

We already flush when the function completes. There is no need to flush
after every compressed cluster.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

381b487d 03/15/2013 05:07 pm Paolo Bonzini

qcow2: make is_allocated return true for zero clusters

Otherwise, live migration of the top layer will miss zero clusters and
let the backing file show through. This also matches what is done in qed.

QCOW2_CLUSTER_ZERO clusters are invalid in v2 image files. Check this...

0d6db300 03/15/2013 05:07 pm MORITA Kazutaka

sheepdog: use non-blocking fd in coroutine context

Using a blocking socket in the coroutine context reduces the chance of
switching to other work. This patch makes the sheepdog driver use a
non-blocking fd always.

Signed-off-by: MORITA Kazutaka <>...

ed9ba724 03/15/2013 05:07 pm MORITA Kazutaka

sheepdog: set io_flush handler in do_co_req

If an io_flush handler is not set, qemu_aio_wait doesn't invoke
callbacks.

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Stefan Hajnoczi <>

1a86938f 03/15/2013 05:07 pm Kevin Wolf

block: Add options QDict to .bdrv_open()

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>
Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Stefan Hajnoczi <>

de9c0cec 03/15/2013 05:07 pm Kevin Wolf

block: Add options QDict to bdrv_open() prototype

It doesn't do anything yet except storing the options QDict in the
BlockDriverState.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>
Reviewed-by: Stefan Hajnoczi <>...

74c4510a 03/15/2013 05:07 pm Kevin Wolf

qcow2: Allow lazy refcounts to be enabled on the command line

qcow2 images now accept a boolean lazy_refcounts options. Use it like
this:

-drive file=test.qcow2,lazy_refcounts=on

If the option is specified on the command line, it overrides the default...

9991923b 03/15/2013 05:07 pm Stefan Hajnoczi

qcow2: flush refcount cache correctly in alloc_refcount_block()

update_refcount() affects the refcount cache, it does not write to disk.
Therefore bdrv_flush(bs->file) does nothing. We need to flush the
refcount cache in order to write out the refcount updates!...

cb1b83e7 03/05/2013 06:51 pm Peter Lieven

iscsi: add iscsi_truncate support

this patch adds iscsi_truncate which effectively allows for
online resizing of iscsi volumes. for this to work you have
to resize the volume on your storage and then call
block_resize command in qemu which will issue a
readcapacity16 to update the capacity....

1dde716e 03/05/2013 06:51 pm Peter Lieven

iscsi: retry read, write, flush and unmap on unit attention check conditions

the storage might return a check condition status for various reasons.
(e.g. bus reset, capacity change, thin-provisioning info etc.)

currently all these informative status responses lead to an I/O error...

bf1c852a 03/04/2013 10:54 am MORITA Kazutaka

move socket_set_nodelay to osdep.c

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Stefan Hajnoczi <>

5d6768e3 03/04/2013 10:54 am MORITA Kazutaka

sheepdog: accept URIs

The URI syntax is consistent with the NBD and Gluster syntax. The
syntax is

sheepdog[+tcp]://[host:port]/vdiname[#snapid|#tag]

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Stefan Hajnoczi <>

25af257d 03/04/2013 10:54 am MORITA Kazutaka

sheepdog: use inet_connect to simplify connect code

This uses the form "<host>:<port>" for the representation of the
sheepdog server to use inet_connect.

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Stefan Hajnoczi <>

1b8bbb46 03/04/2013 10:54 am MORITA Kazutaka

sheepdog: add support for connecting to unix domain socket

This patch adds support for a unix domain socket for a connection
between qemu and local sheepdog server. You can use the unix domain
socket with the following syntax:

$ qemu sheepdog+unix:///&lt;vdiname&gt;?socket=&lt;socket path&gt;[#snapid]...
801f7044 02/22/2013 10:21 pm Stefan Hajnoczi

qcow2: introduce check_refcounts_l1/l2() flags

The check_refcounts_l1/l2() functions have a check_copied argument to
check that the QCOW_O_COPIED flag is consistent with refcount == 1.
This should be a bool, not an int.

However, the next patch introduces qcow2 fragmentation statistics and...

fba31bae 02/22/2013 10:21 pm Stefan Hajnoczi

qcow2: record fragmentation statistics during check

The qemu-img check command can display fragmentation statistics: * Total number of clusters in virtual disk * Number of allocated clusters * Number of fragmented clusters

This patch adds fragmentation statistics support to qcow2....

4db35162 02/22/2013 10:21 pm Stefan Hajnoczi

qcow2: support compressed clusters in BlockFragInfo

Signed-off-by: Stefan Hajnoczi <>

c6bb9ad1 02/22/2013 10:21 pm Federico Simoncelli

qemu-img: find the image end offset during check

This patch adds the support for reporting the image end offset (in
bytes). This is particularly useful after a conversion (or a rebase)
where the destination is a block device in order to find the first
unused byte at the end of the image....

8a8f5840 02/13/2013 07:57 pm Stefan Hajnoczi

block/curl: only restrict protocols with libcurl>=7.19.4

The curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, ...) interface was
introduced in libcurl 7.19.4. Therefore we cannot protect against
CVE-2013-0249 when linking against an older libcurl.

This fixes the build failure introduced by...

33ccf667 02/12/2013 01:25 pm Stefan Hajnoczi

Revert "block/vpc: Fix size calculation"

This reverts commit f880defbb06708d30a38ce9f2667067626acdd38.

Jeff Cody's testing revealed that the interpretation of size differs
even between VirtualPC and HyperV. Revert this so there is time to
consider the impact of any backwards incompatible behavior this change...

da888d37 02/12/2013 01:22 pm Stefan Hajnoczi

block/raw-posix: detect readonly Linux block devices using BLKROGET

Linux block devices can be set read-only with "blockdev --setro
<device>". The same thing can be done for LVM volumes using "lvchange
--permission r <volume>". This read-only setting is independent of...

f880defb 02/11/2013 04:14 pm Stefan Weil

block/vpc: Fix size calculation

The size calculated from the CHS values is not the real image (disk) size,
but usually a smaller value. This is caused by rounding effects.

Only older operating systems use CHS. Such guests won't be able to use
the whole disk. All modern operating systems use the real size....

312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
fb6d1bbd 02/08/2013 07:14 pm Stefan Hajnoczi

block/curl: disable extra protocols to prevent CVE-2013-0249

There is a buffer overflow in libcurl POP3/SMTP/IMAP. The workaround is
simple: disable extra protocols so that they cannot be exploited. Full
details here:

http://curl.haxx.se/docs/adv_20130206.html...
fdf263f6 02/01/2013 04:11 pm Andreas Färber

block/raw-posix: Build fix for O_ASYNC

Commit eeb6b45d48800e96f67ef2a5c80332557fd45ddb (block: raw-posix image
file reopen) broke the build on OpenIndiana.

illumos has no O_ASYNC. Exclude it from flags to be compared
and instead assert that it is not set where defined....

69d34a36 02/01/2013 03:58 pm Kevin Wolf

dmg: Fix bdrv_open() error handling

Return -errno instead of -1 on errors and add error checks in some
places that didn't have one. Passing things by reference requires more
correct typing, replaced a few off_ts therefore - with a 32-bit off_t
this is even a fix for truncation bugs....

4f8aa2e1 02/01/2013 03:58 pm Kevin Wolf

dmg: Use g_free instead of free

The buffers are allocated with g_(re)alloc, so use g_free to free them.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

46536235 02/01/2013 03:58 pm Kevin Wolf

parallels: Fix bdrv_open() error handling

Return -errno instead of -1 on errors. Hey, no memory leak to fix here
while we're touching it!

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

cd923475 02/01/2013 03:58 pm Philipp Hahn

vmdk: Allow space in file name

The previous scanf() format string stopped parsing the file name on the
first white white space, which seems to be allowed at least by VMware
Workstation.

Change the format string to collect everything between the first and...

7f2039f6 02/01/2013 03:58 pm Othmar Pasteka

vmdk: Allow selecting SCSI adapter in image creation

Introduce a new option "adapter_type" when converting to vmdk images.
It can be one of the following: ide (default), buslogic, lsilogic
or legacyESX (according to the vmdk spec from vmware).

In case of a non-ide adapter, heads is set to 255 instead of the 16....

6f74c260 02/01/2013 03:58 pm Liu Yuan

sheepdog: pass vdi_id to sheep daemon for sd_close()

Sheep daemon needs vdi_id to identify which vdi is closed to release resources
such as object cache.

Cc: MORITA Kazutaka <>
Cc: Kevin Wolf <>
Cc: Stefan Hajnoczi <>...

5b7d7dfd 02/01/2013 03:58 pm Kevin Wolf

bochs: Fix bdrv_open() error handling

Return -errno instead of -1 on errors. While touching the
code, fix a memory leak.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

1a60657f 02/01/2013 03:58 pm Kevin Wolf

cloop: Fix bdrv_open() error handling

Return -errno instead of -1 on errors. While touching the
code, fix a memory leak.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

59294e46 02/01/2013 03:58 pm Kevin Wolf

vpc: Fix bdrv_open() error handling

Return -errno instead of -1 on errors. While touching the
code, fix a memory leak.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

6528499f 01/30/2013 12:14 pm Markus Armbruster

g_malloc(0) and g_malloc0(0) return NULL; simplify

Once upon a time, it was decided that qemu_malloc(0) should abort.
Switching to glib retired that bright idea. Some code that was added
to cope with it (e.g. in commits 702ef63, b76b6e9) is still around....

402a4741 01/25/2013 07:18 pm Paolo Bonzini

mirror: support more than one in-flight AIO operation

With AIO support in place, we can start copying more than one chunk
in parallel. This patch introduces the required infrastructure for
this: the buffer is split into multiple granularity-sized chunks,...

884fea4e 01/25/2013 07:18 pm Paolo Bonzini

mirror: support arbitrarily-sized iterations

Yet another optimization is to extend the mirroring iteration to include more
adjacent dirty blocks. This limits the number of I/O operations and makes
mirroring efficient even with a small granularity. Most of the infrastructure...

15bac0d5 01/25/2013 07:18 pm Stefan Weil

block: Use error code EMEDIUMTYPE for wrong format in some block drivers

This improves error reports for bochs, cow, qcow, qcow2, qed and vmdk
when a file with the wrong format is selected.

Signed-off-by: Stefan Weil <>
Reviewed-by: Eric Blake <>...

9f0470bb 01/25/2013 07:18 pm Stefan Weil

block/vdi: Improve debug output for signature

The signature is a 32 bit value and needs up to 8 hex digits for printing.

Signed-off-by: Stefan Weil <>
Reviewed-by: Eric Blake <>
Signed-off-by: Kevin Wolf <>

8937f822 01/25/2013 07:18 pm Stefan Weil

block/vdi: Improved return values from vdi_open

vdi_open returned -1 in case of any error, but it should return an
error code (negative value of errno or -EMEDIUMTYPE).

Signed-off-by: Stefan Weil <>
Reviewed-by: Eric Blake <>...

0e87ba2c 01/25/2013 07:18 pm Stefan Weil

block/vdi: Check for bad signature

vdi_open did not check for a bad signature.
This check was only in vdi_probe.

Signed-off-by: Stefan Weil <>
Reviewed-by: Eric Blake <>
Signed-off-by: Kevin Wolf <>

88ff0e48 01/25/2013 07:18 pm Paolo Bonzini

mirror: do nothing on zero-sized disk

On a zero-sized disk we need to break out of the job successfully
before bdrv_dirty_iter_init is called, otherwise you will get an
assertion failure with the next patch.

Signed-off-by: Paolo Bonzini <>...

50717e94 01/25/2013 07:18 pm Paolo Bonzini

block: allow customizing the granularity of the dirty bitmap

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

eee13dfe 01/25/2013 07:18 pm Paolo Bonzini

mirror: allow customizing the granularity

The desired granularity may be very different depending on the kind of
operation (e.g. continuous replication vs. collapse-to-raw) and whether
the VM is expected to perform lots of I/O while mirroring is in progress....

bd48bde8 01/25/2013 07:18 pm Paolo Bonzini

mirror: switch mirror_iteration to AIO

There is really no change in the behavior of the job here, since
there is still a maximum of one in-flight I/O operation between
the source and the target. However, this patch already introduces
the AIO callbacks (which are unmodified in the next patch)...

08e4ed6c 01/25/2013 07:18 pm Paolo Bonzini

mirror: add buf-size argument to drive-mirror

This makes sense when the next commit starts using the extra buffer space
to perform many I/O operations asynchronously.

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

8f0720ec 01/25/2013 07:18 pm Paolo Bonzini

block: implement dirty bitmap using HBitmap

This actually uses the dirty bitmap in the block layer, and converts
mirroring to use an HBitmapIter.

Reviewed-by: Laszlo Ersek <> (except block/mirror.c parts)
Reviewed-by: Eric Blake <>...

b812f671 01/25/2013 07:18 pm Paolo Bonzini

mirror: perform COW if the cluster size is bigger than the granularity

When mirroring runs, the backing files for the target may not yet be
ready. However, this means that a copy-on-write operation on the target
would fill the missing sectors with zeros. Copy-on-write only happens...

acc906c6 01/25/2013 07:18 pm Paolo Bonzini

block: return count of dirty sectors, not chunks

Reviewed-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

4790b03d 01/24/2013 04:37 pm Paolo Bonzini

iscsi: do not leak acb->buf when commands are aborted

acb->buf is freed in the WRITE callback, but this may not
get called at all when commands are aborted. Add another
free in the ABORT TASK callback, which requires setting acb->buf
to NULL everywhere....

7371d56f 01/24/2013 04:37 pm Peter Lieven

iscsi: add support for iovectors

This patch adds support for directly passing the iovec
array from QEMUIOVector if libiscsi supports it (1.8.0
or newer).

Signed-off-by: Peter Lieven <>
[Preserve the improvements from commit 4cc841b, iscsi: partly...

177f7fc6 01/23/2013 05:08 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/scsi-next' into staging

  1. By Peter Lieven (3) and others
  2. Via Paolo Bonzini
    • bonzini/scsi-next:
      scsi: Drop useless null test in scsi_unit_attention()
      lsi: use qbus_reset_all to reset SCSI bus
      scsi: fix segfault with 0-byte disk...
de8864e5 01/22/2013 04:07 pm Peter Lieven

iscsi: add iscsi_create support

This patch adds support for bdrv_create. This allows e.g.
to use qemu-img to convert from any supported device to
an iscsi backed storage as destination.

Signed-off-by: Peter Lieven <>
Signed-off-by: Paolo Bonzini <>

4cc841b5 01/22/2013 04:07 pm Peter Lieven

iscsi: partly avoid iovec linearization in iscsi_aio_writev

libiscsi expects all write16 data in a linear buffer. If the
iovec only contains one buffer we can skip the linearization
step as well as the additional malloc/free and pass the
buffer directly....

5b5d34ec 01/22/2013 04:07 pm Peter Lieven

iscsi: add support for iSCSI NOPs [v2]

This patch will send NOP-Out PDUs every 5 seconds to the iSCSI target.
If a consecutive number of NOP-In replies fail a reconnect is initiated.
iSCSI NOPs help to ensure that the connection to the target is still operational....

8b17ed4c 01/20/2013 07:01 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/block' into staging

  1. By Kevin Wolf (4) and others
  2. Via Stefan Hajnoczi
    • stefanha/block:
      dataplane: support viostor virtio-pci status bit setting
      dataplane: avoid reentrancy during virtio_blk_data_plane_stop()...
c36dd8a0 01/19/2013 04:35 pm Andreas Färber

block/raw-posix: Make hdev_aio_discard() available outside Linux

Fixes the build on OpenBSD among others.

Suggested-by: Kevin Wolf <>
Signed-off-by: Andreas Färber <>
Cc: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

3249dbe6 01/18/2013 10:57 am Michael Tokarev

win32-aio: use iov utility functions instead of open-coding them

We have iov_from_buf() and iov_to_buf(), use them instead of
open-coding these in block/win32-aio.c

Signed-off-by: Stefan Hajnoczi <>

e8bccad5 01/17/2013 11:58 am Kevin Wolf

win32-aio: Fix memory leak

The buffer is allocated for both reads and writes, and obviously it
should be freed even if an error occurs.

Cc:
Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

bcbbd234 01/17/2013 11:57 am Kevin Wolf

win32-aio: Fix vectored reads

Copying data in the right direction really helps a lot!

Cc:
Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

6d759117 01/17/2013 11:51 am Jeff Cody

block: fix null-pointer bug on error case in block commit

This is a bug that was caught by a coverity run by Markus. In
the error case when we errored out to exit_restore_open early in the
function, 'overlay_bs' was still NULL at that point, although it is...

7191bf31 01/15/2013 06:28 pm Markus Armbruster

block: Fix how mirror_run() frees its buffer

It allocates with qemu_blockalign(), therefore it must free with
qemu_vfree(), not g_free().

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

7479acdb 01/15/2013 05:47 pm Markus Armbruster

win32-aio: Fix how win32_aio_process_completion() frees buffer

win32_aio_submit() allocates it with qemu_blockalign(), therefore it
must be freed with qemu_vfree(), not g_free().

Signed-off-by: Markus Armbruster <>
Reviewed-by: Kevin Wolf <>...

f700f8e3 01/15/2013 02:40 pm Liu Yuan

sheepdog: clean up sd_aio_setup()

The last two parameters of sd_aio_setup() are never used, so remove them.

Cc: MORITA Kazutaka <>
Cc: Kevin Wolf <>
Cc: Stefan Hajnoczi <>
Signed-off-by: Liu Yuan <>...

47783072 01/15/2013 12:18 pm Liu Yuan

sheepdog: multiplex the rw FD to flush cache

This will reduce sockfds connected to the sheep server to one, which simply the
future hacks.

Cc: MORITA Kazutaka <>
Cc: Kevin Wolf <>
Cc: Stefan Hajnoczi <>...

3d4fa43e 01/15/2013 11:03 am Kusanagi Kouichi

raw-posix: support discard on more filesystems

Linux 2.6.38 introduced the filesystem independent interface to
deallocate part of a file. As of Linux 3.7, btrfs, ext4, ocfs2,
tmpfs and xfs support it.

Even though the system calls here are in practice issued on Linux,...

c85191e5 01/15/2013 11:03 am Paolo Bonzini

raw-posix: remember whether discard failed

Avoid sending system calls repeatedly if they shall fail. This
does not apply to XFS: if the filesystem-specific ioctl fails,
something weird is happening.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

fcd9d455 01/15/2013 11:03 am Paolo Bonzini

raw: support discard on block devices

Block devices use a ioctl instead of fallocate, so add a separate
implementation.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

8238010b 01/15/2013 11:03 am Paolo Bonzini

block: make discard asynchronous

This is easy with the thread pool, because we can use s->is_xfs and
s->has_discard from the worker function.

QEMU has a widespread assumption that each I/O operation writes less
than 2^32 bytes. This patch doesn't fix it throughout of course,...

8d2497c3 01/15/2013 10:08 am Kevin Wolf

qcow2: Fix segfault on zero-length write

One of the recent refactoring patches (commit f50f88b9) didn't take care
to initialise l2meta properly, so with zero-length writes, which don't
even enter the write loop, qemu just segfaulted.

Signed-off-by: Kevin Wolf <>...

da758bd7 01/14/2013 06:26 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

  • kwolf/for-anthony:
    dataplane: handle misaligned virtio-blk requests
    dataplane: extract virtio-blk read/write processing into do_rdwr_cmd()
    block: make qiov_is_aligned() public
    raw-posix: fix bdrv_aio_ioctl...
0e7106d8 01/14/2013 11:06 am Liu Yuan

sheepdog: implement direct write semantics

Sheepdog supports both writeback/writethrough write but has not yet supported
DIRECTIO semantics which bypass the cache completely even if Sheepdog daemon is
set up with cache enabled.

Suppose cache is enabled on Sheepdog daemon size, the new cache control is...

b608c8dc 01/14/2013 11:06 am Paolo Bonzini

raw-posix: fix bdrv_aio_ioctl

When the raw-posix aio=thread code was moved from posix-aio-compat.c
to block/raw-posix.c, there was an unintended change to the ioctl code.
The code used to return the ioctl command, which posix_aio_read()
would later morph into a zero. This hack is not necessary anymore,...

c53b1c51 01/14/2013 11:06 am Stefan Hajnoczi

block: make qiov_is_aligned() public

The qiov_is_aligned() function checks whether a QEMUIOVector meets a
BlockDriverState's alignment requirements. This is needed by
virtio-blk-data-plane so:

1. Move the function from block/raw-posix.c to block/block.c....

4d454574 01/12/2013 06:17 pm Paolo Bonzini

qemu-option: move standard option definitions out of qemu-config.c

Signed-off-by: Paolo Bonzini <>

eb7ff6fb 01/11/2013 10:44 am Stefan Weil

Replace remaining gmtime, localtime by gmtime_r, localtime_r

This allows removing of MinGW specific code and improves
reentrancy for POSIX hosts.

[Removed unused ret variable in qemu_get_timedate() to fix warning:
vl.c: In function ‘qemu_get_timedate’:
vl.c:451:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]...

d6b1ef89 01/02/2013 05:09 pm Liu Yuan

sheepdog: pass oid directly to send_pending_req()

Cc: MORITA Kazutaka <>
Cc: Kevin Wolf <>
Signed-off-by: Liu Yuan <>
Reviewed-by: MORITA Kazutaka <>
Signed-off-by: Stefan Hajnoczi <>

bd751f22 01/02/2013 05:08 pm Liu Yuan

sheepdog: don't update inode when create_and_write fails

For the error case such as SD_RES_NO_SPACE, we shouldn't update the inode bitmap
to avoid the scenario that the object is allocated but wasn't created at the
server side. This will result in VM's IO error on the failed object....

fccedc62 01/02/2013 05:08 pm Stefan Weil

block/raw-win32: Fix compiler warnings (wrong format specifiers)

Commit fbcad04d6bfdff937536eb23088a01a280a1a3af added fprintf statements
with wrong format specifiers.

GetLastError() returns a DWORD which is unsigned long, so %lu must be used.

Signed-off-by: Stefan Weil <>...

4065742a 01/02/2013 04:31 pm Stefan Hajnoczi

raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane

The raw_get_aio_fd() function allows virtio-blk-data-plane to get the
file descriptor of a raw image file with Linux AIO enabled. This
interface is really a layering violation that can be resolved once the...

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

caf71f86 12/19/2012 09:31 am Paolo Bonzini

migration: move include files to include/migration/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

f8fe7964 12/19/2012 09:29 am Paolo Bonzini

janitor: do not include qemu-char everywhere

Touching char/char.h basically causes the whole of QEMU to
be rebuilt. Avoid this, it is usually unnecessary.

Signed-off-by: Paolo Bonzini <>

077805fa 12/19/2012 09:29 am Paolo Bonzini

janitor: do not rely on indirect inclusions of or from qemu-char.h

Various header files rely on qemu-char.h including qemu-config.h or
main-loop.h, but they really do not need qemu-char.h at all (particularly
interesting is the case of the block layer!). Clean this up, and also...

525877c9 12/19/2012 09:29 am Paolo Bonzini

build: move rules from Makefile to */Makefile.objs

Signed-off-by: Paolo Bonzini <>

593fb83c 12/13/2012 04:37 pm Kevin Wolf

qcow2: Introduce Qcow2COWRegion

This makes it easier to address the areas for which a COW must be
performed. As a nice side effect, the COW code in
qcow2_alloc_cluster_link_l2 becomes really trivial.

Signed-off-by: Kevin Wolf <>

cf5c1a23 12/13/2012 04:37 pm Kevin Wolf

qcow2: Allocate l2meta dynamically

As soon as delayed COW is introduced, the l2meta struct is needed even
after completion of the request, so it can't live on the stack.

Signed-off-by: Kevin Wolf <>

060bee89 12/13/2012 04:37 pm Kevin Wolf

qcow2: Drop l2meta.cluster_offset

There's no real reason to have an l2meta for normal requests that don't
allocate anything. Before we can get rid of it, we must return the host
cluster offset in a different way.

Signed-off-by: Kevin Wolf <>

f50f88b9 12/13/2012 04:37 pm Kevin Wolf

qcow2: Allocate l2meta only for cluster allocations

Even for writes to already allocated clusters, an l2meta is allocated,
though it stays effectively unused. After this patch, only allocating
requests still have one. Each l2meta now describes an in-flight request...

280d3735 12/13/2012 04:37 pm Kevin Wolf

qcow2: Enable dirty flag in qcow2_alloc_cluster_link_l2

This is closer to where the dirty flag is really needed, and it avoids
having checks for special cases related to cluster allocation directly
in the writev loop.

Signed-off-by: Kevin Wolf <>

4e95314e 12/13/2012 04:37 pm Kevin Wolf

qcow2: Execute run_dependent_requests() without lock

There's no reason for run_dependent_requests() to hold s->lock, and a
later patch will require that in fact the lock is not held.

Also, before this patch, run_dependent_requests() not only does what its...

226c3c26 12/13/2012 04:37 pm Kevin Wolf

qcow2: Factor out handle_dependencies()

Signed-off-by: Kevin Wolf <>