Statistics
| Branch: | Revision:

root / block @ 593fb83c

# Date Author Comment
1d3afd64 12/13/2012 04:37 pm Kevin Wolf

qcow2: Round QCowL2Meta.offset down to cluster boundary

The offset within the cluster is already present as n_start and this is
what the code uses. QCowL2Meta.offset is only needed at a cluster
granularity.

Signed-off-by: Kevin Wolf <>

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

312a2ba0 12/12/2012 01:33 pm Kevin Wolf

blkdebug: Allow usage without config file

As soon as new rules can be set during runtime, as introduced by the
next patch, blkdebug makes sense even without a config file.

Signed-off-by: Kevin Wolf <>

9e35542b 12/12/2012 01:33 pm Kevin Wolf

blkdebug: Factor out remove_rule()

The cleanup work to remove a rule depends on the type of the rule. It's
easy for the existing rules as there is no data that must be cleaned up
and is specific to a type yet, but the next patch will change this.

Signed-off-by: Kevin Wolf <>

3c90c65d 12/12/2012 01:33 pm Kevin Wolf

blkdebug: Implement suspend/resume of AIO requests

This allows more systematic AIO testing. The patch adds three new
operations to blkdebug:

  • Setting a "breakpoint" on a blkdebug event. The next request that
    triggers this breakpoint is suspended and is tagged with a name....
67a7a0eb 12/12/2012 01:33 pm Kevin Wolf

qcow2: Move BLKDBG_EVENT out of the lock

We want to use these events to suspend requests for testing concurrent
AIO requests. Suspending requests while they are holding the CoMutex is
rather boring for this purpose.

Signed-off-by: Kevin Wolf <>

fbcad04d 12/11/2012 12:36 pm Fabien Chouteau

Fix error code checking for SetFilePointer() call

An error has occurred if the return value is invalid_set_file_pointer
and getlasterror doesn't return no_error.

Signed-off-by: Fabien Chouteau <>
Acked-by: Stefan Hajnoczi <>

473c7f02 12/11/2012 12:05 pm Stefan Priebe

rbd: Fix race between aio completition and aio cancel

This one fixes a race which qemu had also in iscsi block driver
between cancellation and io completition.

qemu_rbd_aio_cancel was not synchronously waiting for the end of
the command.

To archieve this it introduces a new status flag which uses...

258d2edb 12/11/2012 12:04 pm Charles Arnold

block: vpc support for ~2 TB disks

The VHD specification allows for up to a 2 TB disk size. The current
implementation in qemu emulates EIDE and ATA-2 hardware which only allows
for up to 127 GB. This disk size limitation can be overridden by allowing
up to 255 heads instead of the normal 4 bit limitation of 16. Doing so...

c208e8c2 12/11/2012 12:04 pm Paolo Bonzini

raw-posix: inline paio_ioctl into hdev_aio_ioctl

clang now warns about an unused function:
CC block/raw-posix.o
block/raw-posix.c:707:26: warning: unused function paio_ioctl
[-Wunused-function]
static BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,...

c57b6656 12/11/2012 12:04 pm Kevin Wolf

aio: Get rid of qemu_aio_flush()

There are no remaining users, and new users should probably be
using bdrv_drain_all() in the first place.

Signed-off-by: Kevin Wolf <>

1fe1fa51 12/11/2012 12:04 pm Charles Arnold

block: vpc initialize the uuid footer field

Initialize the uuid field in the footer with a generated uuid.

Signed-off-by: Charles Arnold <>
Reviewed-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

f807ecd5 11/28/2012 01:51 pm Peter Lieven

iscsi: do not assume device is zero initialized

Without any complex checks we can't assume that an
iscsi target is initialized to zero.

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

e829b0bb 11/28/2012 01:50 pm Peter Lieven

iscsi: fix deadlock during login

If the connection is interrupted before the first login is successfully
completed qemu-kvm is waiting forever in qemu_aio_wait().

This is fixed by performing an sync login to the target. If the
connection breaks after the first successful login errors are...

8da1e18b 11/28/2012 01:46 pm Peter Lieven

iscsi: fix segfault in url parsing

If an invalid URL is specified iscsi_get_error(iscsi) is called
with iscsi == NULL.

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

08448d51 11/21/2012 10:43 am Stefan Priebe

use int64_t for return values from rbd instead of int

rbd / rados tends to return pretty often length of writes
or discarded blocks. These values might be bigger than int.

The steps to reproduce are:

mkfs.xfs -f a whole device bigger than int in bytes. mkfs.xfs sends...
1bc6b705 11/21/2012 10:40 am Jeff Cody

block: add bdrv_reopen() support for raw hdev, floppy, and cdrom

For hdev, floppy, and cdrom, the reopen() handlers are the same as
for the file reopen handler. For floppy and cdrom types, however,
we keep O_NONBLOCK, as in the _open function.

Signed-off-by: Jeff Cody <>...

8ba2aae3 11/21/2012 10:40 am Stefan Hajnoczi

vdi: don't override libuuid symbols

It's poor symbol hygiene to provide a global symbols that collide with a
common library like libuuid. If QEMU links against a shared library
that depends on uuid_generate() it can end up calling our stub version
of the function....

b1649fae 11/14/2012 07:19 pm Gerhard Wiesinger

vmdk: Fix data corruption bug in WRITE and READ handling

Fixed a MAJOR BUG in VMDK files on file boundaries on reads
and ALSO ON WRITES WHICH MIGHT CORRUPT THE IMAGE AND DATA!!!!!!

Triggered for example with the following VMDK file (partly listed):
RW 4193792 FLAT "XP-W1-f001.vmdk" 0...

a3548077 11/14/2012 07:19 pm Kevin Wolf

qcow2: Fix refcount table size calculation

A missing factor for the refcount table entry size in the calculation
could mean that too little memory was allocated for the in-memory
representation of the table, resulting in a buffer overflow.

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

cee40d2d 11/14/2012 07:19 pm Stefan Weil

block: Workaround for older versions of MinGW gcc

Versions before gcc-4.6 don't support unnamed fields in initializers
(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676).

Offset and OffsetHigh belong to an unnamed struct which is part of an
unnamed union. Therefore the original code does not work with older...

d7331bed 11/14/2012 07:19 pm Stefan Hajnoczi

aio: rename AIOPool to AIOCBInfo

Now that AIOPool no longer keeps a freelist, it isn't really a "pool"
anymore. Rename it to AIOCBInfo and make it const since it no longer
needs to be modified.

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

1d7d2a9d 11/12/2012 03:38 pm Paolo Bonzini

nbd: accept URIs

The URI syntax is consistent with the Gluster syntax. Export names
are specified in the path, preceded by one or more (otherwise unused)
slashes.

Signed-off-by: Paolo Bonzini <>

d04b0bbb 11/12/2012 12:33 pm Paolo Bonzini

nbd: accept relative path to Unix socket

Adding the "is_unix" member now will simplify the parsing of NBD URIs.

Signed-off-by: Paolo Bonzini <>

f563a5d7 10/31/2012 11:42 am Paolo Bonzini

Merge remote-tracking branch 'origin/master' into threadpool

Signed-off-by: Paolo Bonzini <>

fc4edb84 10/31/2012 11:38 am Paolo Bonzini

raw-win32: add emulated AIO support

Signed-off-by: Paolo Bonzini <>

10fb6e06 10/31/2012 11:38 am Paolo Bonzini

raw-posix: move linux-aio.c to block/

Signed-off-by: Paolo Bonzini <>

a2736526 10/31/2012 11:38 am Paolo Bonzini

raw-win32: implement native asynchronous I/O

With the new support for EventNotifiers in the AIO event loop, we
can hook a completion port to every opened file and use asynchronous
I/O on them.

Wine's support is extremely inefficient, also because it really does...

47e6b251 10/31/2012 11:38 am Paolo Bonzini

block: switch posix-aio-compat to threadpool

This is not meant for portability, but to remove code duplication.

Signed-off-by: Paolo Bonzini <>

de81a169 10/31/2012 11:38 am Paolo Bonzini

raw: merge posix-aio-compat.c into block/raw-posix.c

Making the qemu_paiocb specific to raw devices will let us access members
of the BDRVRawState arbitrarily.

Signed-off-by: Paolo Bonzini <>

9f8540ec 10/31/2012 11:38 am Paolo Bonzini

raw-posix: rename raw-posix-aio.h, hide unavailable prototypes

Signed-off-by: Paolo Bonzini <>

f42b2207 10/30/2012 10:30 am Paolo Bonzini

aio: add Win32 implementation

The Win32 implementation will only accept EventNotifiers, thus a few
drivers are disabled under Windows. EventNotifiers are a good match
for the GSource implementation, too, because the Win32 port of glib
allows to place their HANDLEs in a GPollFD....

d63ffd87 10/24/2012 11:26 am Paolo Bonzini

mirror: implement completion

Switching to the target of the migration is done mostly asynchronously,
and reported to management via the BLOCK_JOB_COMPLETED event; the only
synchronous phase is opening the backing files. bdrv_open_backing_file
can always be done, even for migration of the full image (aka sync:...

b952b558 10/24/2012 11:26 am Paolo Bonzini

mirror: add support for on-source-error/on-target-error

Error management is important for mirroring; otherwise, an error on the
target (even something as "innocent" as ENOSPC) requires to start again
with a full copy. Similar to on_read_error/on_write_error, two separate...

d5208c45 10/24/2012 11:26 am Jeff Cody

block: in commit, determine base image from the top image

This simplifies some code and error checking, and also fixes a bug.

bdrv_find_backing_image() should only be passed absolute filenames,
or filenames relative to the chain. In the QMP message handler for...

65f46322 10/24/2012 11:26 am Paolo Bonzini

block: rename block_job_complete to block_job_completed

The imperative will be used for the QMP command.

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

893f7eba 10/24/2012 11:26 am Paolo Bonzini

mirror: introduce mirror job

This patch adds the implementation of a new job that mirrors a disk to
a new image while letting the guest continue using the old image.
The target is treated as a "black box" and data is copied from the
source to the target in the background. This can be used for several...

2f536801 10/12/2012 11:47 am MORITA Kazutaka

sheepdog: use bool for boolean variables

This improves readability.

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

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

00ea1881 10/05/2012 03:58 pm Jim Meyering

qcow2: mark this file's sole strncpy use as justified

Acked-by: Kevin Wolf <>
Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

3178e275 10/05/2012 03:58 pm Jim Meyering

sheepdog: avoid a few buffer overruns

  • parse_vdiname: Use pstrcpy, not strncpy, when the destination
    buffer must be NUL-terminated.
  • sd_open: Likewise, avoid buffer overrun.
  • do_sd_create: Likewise. Leave the preceding memset, since
    pstrcpy does not NUL-fill, and filename needs that....
d66f8e7b 10/05/2012 03:58 pm Jim Meyering

vmdk: relative_path: use pstrcpy in place of strncpy

Avoid strncpy+manual-NUL-terminate. Use pstrcpy instead.

Acked-by: Kevin Wolf <>
Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

1d809098 09/28/2012 08:40 pm Paolo Bonzini

stream: add on-error argument

This patch adds support for error management to streaming.

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

8f96b5be 09/28/2012 08:40 pm Paolo Bonzini

blkdebug: process all set_state rules in the old state

Currently it is impossible to write a blkdebug script that ping-pongs
between two states, because the second set-state rule will use the
state that is set in the first. If you have

[set-state]
event = "..."...
92aa5c6d 09/28/2012 08:40 pm Paolo Bonzini

iostatus: move BlockdevOnError declaration to QAPI

This will let block-stream reuse the enum. Places that used the enums
are renamed accordingly.

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

2f0c9fe6 09/28/2012 08:14 pm Paolo Bonzini

block: move job APIs to separate files

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

747ff602 09/28/2012 07:23 pm Jeff Cody

block: add live block commit functionality

This adds the live commit coroutine. This iteration focuses on the
commit only below the active layer, and not the active layer itself.

The behaviour is similar to block streaming; the sectors are walked
through, and anything that exists above 'base' is committed back down...

8d6d89cb 09/28/2012 06:58 pm Bharata B Rao

block: Support GlusterFS as a QEMU block backend.

This patch adds gluster as the new block backend in QEMU. This gives
QEMU the ability to boot VM images from gluster volumes. Its already
possible to boot from VM images on gluster volumes using FUSE mount, but...

444dbc38 09/26/2012 12:06 am Anthony Liguori

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

  • kwolf/for-anthony:
    block: remove keep_read_only flag from BlockDriverState struct
    block: convert bdrv_commit() to use bdrv_reopen()
    block: vpc image file reopen
    block: vdi image file reopen...
3d1807ac 09/24/2012 04:15 pm Jeff Cody

block: purge s->aligned_buf and s->aligned_buf_size from raw-posix.c

The aligned_buf pointer and aligned_buf size are no longer used in
raw_posix.c, so remove all references to them.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

eeb6b45d 09/24/2012 04:15 pm Jeff Cody

block: raw-posix image file reopen

This is derived from the Supriya Kannery's reopen patches.

This contains the raw-posix driver changes for the bdrv_reopen_*
functions. All changes are staged into a temporary scratch buffer
during the prepare() stage, and copied over to the live structure...

01bdddb5 09/24/2012 04:15 pm Jeff Cody

block: raw image file reopen

These are the stubs for the file reopen drivers for the raw format.

There is currently nothing that needs to be done by the raw driver
in reopen.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

f9cb20f1 09/24/2012 04:15 pm Jeff Cody

block: qed image file reopen

These are the stubs for the file reopen drivers for the qed format.

There is currently nothing that needs to be done by the qed driver
in reopen.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

21d82ac9 09/24/2012 04:15 pm Jeff Cody

block: qcow2 image file reopen

These are the stubs for the file reopen drivers for the qcow2 format.

There is currently nothing that needs to be done by the qcow2 driver
in reopen.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

d177692e 09/24/2012 04:15 pm Jeff Cody

block: qcow image file reopen

These are the stubs for the file reopen drivers for the qcow format.

There is currently nothing that needs to be done by the qcow driver
in reopen.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

3897575f 09/24/2012 04:15 pm Jeff Cody

block: vmdk image file reopen

This patch supports reopen for VMDK image files. VMDK extents are added
to the existing reopen queue, so that the transactional model of reopen
is maintained with multiple image files.

Signed-off-by: Jeff Cody <>...

ecfe2bba 09/24/2012 04:15 pm Jeff Cody

block: vdi image file reopen

There is currently nothing that needs to be done for VDI reopen.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

3fe4b700 09/24/2012 04:15 pm Jeff Cody

block: vpc image file reopen

There is currently nothing that needs to be done for VPC image
file reopen.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

fc32a72d 09/24/2012 04:15 pm Jeff Cody

block: move aio initialization into a helper function

Move AIO initialization for raw-posix block driver into a helper function.

In addition to just code motion, the aio_ctx pointer is checked for NULL,
prior to calling laio_init(), to make sure laio_init() is only run once....

6a8dc042 09/24/2012 04:15 pm Jeff Cody

block: move open flag parsing in raw block drivers to helper functions

Code motion, to move parsing of open flags into a helper function.

Signed-off-by: Jeff Cody <>
Signed-off-by: Kevin Wolf <>

39c9fb95 09/24/2012 04:15 pm Jeff Cody

block: do not parse BDRV_O_CACHE_WB in block drivers

Block drivers should ignore BDRV_O_CACHE_WB in .bdrv_open flags,
and in the bs->open_flags.

This patch removes the code, leaving the behaviour behind as if
BDRV_O_CACHE_WB was set.

Signed-off-by: Jeff Cody <>...

9acc5a06 09/24/2012 04:15 pm Jeff Cody

block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c

Rather than check for a non-NULL aligned_buf to determine if
raw_aio_submit needs to check for alignment, check for the presence
of BDRV_O_NOCACHE in the bs->open_flags.

Signed-off-by: Jeff Cody <>...

40a13ca8 09/21/2012 05:12 pm Ronnie Sahlberg

iSCSI: We dont need to explicitely call qemu_notify_event() any more

We no longer need to explicitely call qemu_notify_event() any more
since this is now done automatically any time the filehandles we listen
to change.

Signed-off-by: Ronnie Sahlberg <>...

f1a12821 09/21/2012 05:05 pm Ronnie Sahlberg

iSCSI: We need to support SG_IO also from iscsi_ioctl()

We need to support SG_IO from the synchronous iscsi_ioctl() since
scsi-block uses this to do an INQ to the device to discover its properties
This patch makes scsi-block work with iscsi.

Signed-off-by: Ronnie Sahlberg <>...

1f7a48de 09/12/2012 04:50 pm MORITA Kazutaka

sheepdog: fix savevm and loadvm

This patch sets data to be sent to Sheepdog correctly and fixes savevm
and loadvm operations on a Sheepdog image.

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Kevin Wolf <>

45724d6d 09/12/2012 04:50 pm Stefan Weil

block/curl: Fix wrong free statement

Report from smatch:
block/curl.c:546 curl_close(21) info: redundant null check on s->url calling free()

The check was redundant, and free was also wrong because the memory
was allocated using g_strdup.

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

514f21a5 09/12/2012 04:50 pm Stefan Weil

vdi: Fix warning from clang

ccc-analyzer reports these warnings:

block/vdi.c:704:13: warning: Dereference of null pointer
bmap[i] = VDI_UNALLOCATED;
^
block/vdi.c:702:13: warning: Dereference of null pointer
bmap[i] = i;...

cdedd9d8 08/31/2012 06:04 pm Anthony Liguori

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

  • kwolf/for-anthony:
    qemu-iotests: add backing file smaller than image test case
    stream: complete early if end of backing file is reached
    qed: refuse unaligned zero writes with a backing file
ef72f76e 08/29/2012 04:23 pm Stefan Hajnoczi

qed: refuse unaligned zero writes with a backing file

Zero writes have cluster granularity in QED. Therefore they can only be
used to zero entire clusters.

If the zero write request leaves sectors untouched, zeroing the entire
cluster would obscure the backing file. Instead return -ENOTSUP, which...

571cd9dc 08/29/2012 04:23 pm Stefan Hajnoczi

stream: complete early if end of backing file is reached

It is possible to create an image that is larger than its backing file.
Reading beyond the end of the backing file produces zeroes if no writes
have been made to those sectors in the image file.

This patch finishes streaming early when the end of the backing file is...

135b9088 08/28/2012 03:50 pm Ronnie Sahlberg

iscsi: Set number of blocks to 0 for blank CDROM devices

The number of blocks of the device is used to compute the device size
in bdrv_getlength()/iscsi_getlength().
For MMC devices, the ReturnedLogicalBlockAddress in the READCAPACITY10
has a special meaning when it is 0....

a9b670b1 08/22/2012 09:31 pm Anthony Liguori

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

  • bonzini/scsi-next:
    virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machines
    iscsi: fix races between task completion and abort
    iscsi: simplify iscsi_schedule_bh...
7b2f89c4 08/22/2012 09:01 pm Anthony Liguori

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

  • kwolf/for-anthony:
    virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types
    Documentation: Warn against qemu-img on active image
    vmdk: Read footer for streamOptimized images
    vmdk: Fix header structure...
a7e47d4b 08/22/2012 06:47 pm Jim Meyering

sheepdog: don't leak socket file descriptor upon connection failure

Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

27cbd828 08/20/2012 04:58 pm Paolo Bonzini

iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb

Put these functions at the beginning, to avoid forward references
in the next patches.

Signed-off-by: Paolo Bonzini <>

cfb3f506 08/20/2012 04:58 pm Paolo Bonzini

iscsi: simplify iscsi_schedule_bh

It is always used with the same callback, remove the argument. And
its return value is never used, assume allocation succeeds.

Signed-off-by: Paolo Bonzini <>

1bd075f2 08/20/2012 04:58 pm Paolo Bonzini

iscsi: fix races between task completion and abort

This patch fixes two main issues with block/iscsi.c:

1) iscsi_task_mgmt_abort_task_async calls iscsi_scsi_task_cancel which
was also directly called in iscsi_aio_cancel

2) a race between task completion and task abortion could happen cause...

b2090919 08/20/2012 04:50 pm Paolo Bonzini

Revert "iscsi: Fix NULL dereferences / races between task completion and abort"

This reverts commit 64e69e80920d82df3fa679bc41b13770d2f99360. The commit
returned immediately from iscsi_aio_cancel, risking corruption in case the
following happens:

guest                  qemu                 target...
65bd155c 08/17/2012 02:27 pm Kevin Wolf

vmdk: Read footer for streamOptimized images

The footer takes precedence over the header when it exists. It contains
the real grain directory offset that is missing in the header. Without
this patch, streamOptimized images with a footer cannot be read.

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

7a736bfa 08/17/2012 12:14 pm Kevin Wolf

vmdk: Fix header structure

Commit bb45ded9 swapped gd_offset and rgd_offset. This is wrong.

Signed-off-by: Kevin Wolf <>

64e69e80 08/15/2012 02:16 pm Stefan Priebe

iscsi: Fix NULL dereferences / races between task completion and abort

Signed-off-by: Stefan Priebe <>
Acked-by: Ronnie Sahlberg <>
Signed-off-by: Kevin Wolf <>

e1740828 08/15/2012 11:48 am Corey Bryant

block: Prevent detection of /dev/fdset/ as floppy

Signed-off-by: Corey Bryant <>
Signed-off-by: Kevin Wolf <>

6165f4d8 08/15/2012 11:48 am Corey Bryant

block: Convert open calls to qemu_open

This patch converts all block layer open calls to qemu_open.

Note that this adds the O_CLOEXEC flag to the changed open paths
when the O_CLOEXEC macro is defined.

Signed-off-by: Corey Bryant <>...

2e1e79da 08/15/2012 11:48 am Corey Bryant

block: Convert close calls to qemu_close

This patch converts all block layer close calls, that correspond
to qemu_open calls, to qemu_close.

Signed-off-by: Corey Bryant <>
Signed-off-by: Kevin Wolf <>

53810bab 08/12/2012 03:48 am Anthony Liguori

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

  • kwolf/for-anthony:
    qemu-iotests: skip 039 with ./check -nocache
    block: add BLOCK_O_CHECK for qemu-img check
    qcow2: mark image clean after repair succeeds
    qed: mark image clean after repair succeeds...
31294261 08/12/2012 01:11 am Anthony Liguori

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

  • bonzini/scsi-next:
    scsi-disk: add support for the UNMAP command
    scsi-disk: improve out-of-range LBA detection for WRITE SAME
    scsi-disk: more assertions and resets for aiocb
    virtio-scsi: do not compare 32-bit QEMU tags against 64-bit virtio-scsi tags...
b10170ac 08/10/2012 11:25 am Stefan Hajnoczi

qed: mark image clean after repair succeeds

The dirty bit is cleared after image repair succeeds in qed_open().
Move this into qed_check() so that all callers benefit from this
behavior when fix=true.

This is necessary so qemu-img check can call .bdrv_check() and mark the...

acbe5982 08/10/2012 11:25 am Stefan Hajnoczi

qcow2: mark image clean after repair succeeds

The dirty bit is cleared after image repair succeeds in qcow2_open().
Move this into qcow2_check() so that all callers benefit from this
behavior when fix mode is enabled.

This is necessary so qemu-img check can call .bdrv_check() and mark the...

058f8f16 08/10/2012 11:25 am Stefan Hajnoczi

block: add BLOCK_O_CHECK for qemu-img check

Image formats with a dirty bit, like qed and qcow2, repair dirty image
files upon open with BDRV_O_RDWR. Performing automatic repair when
qemu-img check runs is not ideal because the bdrv_open() call repairs
the image before the actual bdrv_check() call from qemu-img.c....

31459f46 08/09/2012 04:04 pm Ronnie Sahlberg

iscsi: Pick default initiator-name based on the name of the VM

This patch updates the iscsi layer to automatically pick a 'unique'
initiator-name based on the name of the vm in case the user has not set
an explicit iqn-name to use.

Create a new function qemu_get_vm_name() that returns the name of the VM,...

b93c94f7 08/08/2012 03:51 pm Paolo Bonzini

iscsi: do not leak initiator_name

The argument of iscsi_create_context is never freed by libiscsi,
which in fact calls strdup on it. Avoid a leak.

Signed-off-by: Paolo Bonzini <>

f2ef4a6d 08/08/2012 03:51 pm Paolo Bonzini

iscsi: reorganize code for parse_initiator_name

Merge the occurrences of the "iqn.2008-11.org.linux-kvm" string
to avoid duplication.

Signed-off-by: Paolo Bonzini <>

c61d0004 08/06/2012 11:39 pm Stefan Hajnoczi

qcow2: introduce dirty bit

This patch adds an incompatible feature bit to mark images that have not
been closed cleanly. When a dirty image file is opened a consistency
check and repair is performed.

Update qemu-iotests 031 and 036 since the extension header size changes...

bfe8043e 08/06/2012 11:39 pm Stefan Hajnoczi

qcow2: implement lazy refcounts

Lazy refcounts is a performance optimization for qcow2 that postpones
refcount metadata updates and instead marks the image dirty. In the
case of crash or power failure the image will be left in a dirty state
and repaired next time it is opened....

f91cbefe 07/17/2012 05:48 pm Markus Armbruster

vvfat: Fix partition table

Unless parameter ":floppy:" is given, vvfat creates a virtual image
with DOS MBR defining a single partition which holds the FAT file
system. The size of the virtual image depends on the width of the
FAT: 32 MiB (CHS 64, 16, 63) for 12 bit FAT, 504 MiB (CHS 1024, 16,...

4480e0f9 07/17/2012 05:48 pm Markus Armbruster

vvfat: Do not clobber the user's geometry

vvfat creates a virtual VFAT filesystem with a certain logical
geometry that depends on its options. It sets the "geometry hint" to
this geometry. It is the only block driver to do this.

The geometry hint is about about physical geometry, and used only by...

cddd4ac7 07/17/2012 05:48 pm MORITA Kazutaka

sheepdog: always use coroutine-based network functions

This reduces some code duplication.

Signed-off-by: MORITA Kazutaka <>
Signed-off-by: Kevin Wolf <>

19db9b90 07/17/2012 05:48 pm Christoph Hellwig

sheepdog: do not blindly memset all read buffers

Only buffers that map to unallocated blocks need to be zeroed.

Signed-off-by: Christoph Hellwig <>
Acked-by: MORITA Kazutaka <>
Signed-off-by: Kevin Wolf <>

23797df3 07/09/2012 08:35 pm Anthony Liguori

Merge remote-tracking branch 'mjt/mjt-iov2' into staging

  • mjt/mjt-iov2:
    rewrite iov_send_recv() and move it to iov.c
    cleanup qemu_co_sendv(), qemu_co_recvv() and friends
    export iov_send_recv() and use it in iov_send() and iov_recv()
    rename qemu_sendv to iov_send, change proto and move declarations to iov.h...