Statistics
| Branch: | Revision:

root / block @ feature-archipelago

# Date Author Comment
d0277315 03/05/2014 12:38 pm Chrysostomos Nanakos

block: Support Archipelago as a QEMU block backend

d3113fb8 03/05/2014 12:38 pm Chrysostomos Nanakos

block: Free memory on AIO failure

f55ea629 03/04/2014 10:20 pm Andreas Färber

block/gluster: Add missing argument to qemu_gluster_init() call

Commit adccfbcd6020e928db93b2b4faf0dbd05ffbe016 (block: gluster - add
reopen support.) did not supply the qemu_gluster_init() Error **
argument, needed since commit a7451cb850d115f257080aff3fbc54f255ebf8f7...

4a29420e 03/04/2014 06:33 pm Peter Maydell

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Block pull request

  1. gpg: Signature made Fri 28 Feb 2014 18:27:24 GMT using RSA key ID 81AB73C8
  2. gpg: Good signature from "Stefan Hajnoczi <>"
  3. gpg: aka "Stefan Hajnoczi <>"...
739aa555 03/04/2014 04:25 pm Peter Maydell

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

  • remotes/bonzini/scsi-next:
    block/iscsi: fix segfault if writesame fails
    scsi-disk: Add support for port WWN and index descriptors in VPD page 83h
    block/iscsi: query for supported VPD pages...
3eba13ec 02/28/2014 07:59 pm Peter Lieven

block/vmdk: do not report file offset for compressed extents

Signed-off-by: Peter Lieven <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

1b37b344 02/28/2014 07:59 pm Jeff Cody

block: gluster - code movements, state storage changes

In preparation for supporting reopen on gluster, move flag
parsing out to a function. Also, add a NULL check in the
gconf cleanup.

Signed-off-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

adccfbcd 02/28/2014 07:59 pm Jeff Cody

block: gluster - add reopen support.

Gluster does parse open flags in its .bdrv_open() implementation,
and the .bdrv_reopen_* implementations need to do the same.

A new gluster connection to the image file to be created is established
in the .bdrv_reopen_prepare(), and the image file opened with the new...

0c762736 02/28/2014 07:59 pm Benoît Canet

qmp: Make Quorum error events more palatable.

Insert quorum QMP events documentation alphabetically.

Also change the "ret" errno value by an optional "error" being an strerror(-ret)
in the QUORUM_REPORT_BAD qmp event.

Signed-off-by: Benoit Canet <>...

e7a1d6c5 02/25/2014 12:50 pm Peter Maydell

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block patches

  1. gpg: Signature made Fri 21 Feb 2014 21:42:24 GMT using RSA key ID C88F2FD6
  2. gpg: Good signature from "Kevin Wolf <>"
  • remotes/kevin/tags/for-upstream: (54 commits)...
6dedf052 02/24/2014 05:38 pm Peter Maydell

Merge remote-tracking branch 'remotes/bonzini/configure' into staging

  • remotes/bonzini/configure:
    build: softmmu targets do not have a "main.o" file
    configure: Disable libtool if -fPIE does not work with it (bug #1257099)
    block: convert block drivers linked with libs to modules...
d9738fd2 02/22/2014 04:59 pm Peter Lieven

block/iscsi: fix segfault if writesame fails

commit fa6252b0 introduced a segfault because it tries
to read iTask.task->sense after iTask.task has been
freed.

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

837c3901 02/22/2014 11:02 am Peter Lieven

block/iscsi: fix deadlock on scsi check condition

the retry logic was broken because the complete status
of the task structure was not reset. this resulted in
an infinite loop retrying the command over and over.

CC:
Signed-off-by: Peter Lieven <>...

24d3bd67 02/22/2014 11:02 am Peter Lieven

block/iscsi: query for supported VPD pages

this patch ensures that we only query for block provisioning and
block limits vpd pages if they are advertised. It also cleans
up the inquiry code and eliminates some redundant code.

Signed-off-by: Peter Lieven <>...

8a87f3d7 02/21/2014 11:32 pm Max Reitz

quorum: Simplify quorum_open()

Although it may not look like it, this patch simplifies quorum_open().
qdict_array_split() is now able to return QLists with different objects
than only QDicts, therefore it will now do all the work and
quorum_open() does not have to handle reference strings by itself....

1c508d17 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_co_flush().

Makes a vote to select error if any.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

98a7a38f 02/21/2014 11:29 pm Benoît Canet

quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

This is used to activate quorum snapshot.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

c88a1de5 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_open() and quorum_close().

Example of command line:

-drive if=virtio,driver=quorum,\
children.0.file.filename=1.raw,\
children.0.node-name=1.raw,\
children.0.driver=raw,\
children.1.file.filename=2.raw,\
children.1.node-name=2.raw,\
children.1.driver=raw,\...

95c6bff3 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum mechanism.

This patchset enables the core of the quorum mechanism.
The num_children reads are compared to get the majority version and if this
version exists more than threshold times the guest won't see the error at all.

If a block is corrupted or if an error occurs during an IO or if the quorum...

d55dee20 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_getlength().

Check that every bs file returns the same length.
Otherwise, return -EIO to disable the quorum and
avoid length discrepancy.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

a28e4c40 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_invalidate_cache().

We really want that live migration works with quorum so implement
quorum_invalidate_cache().

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

13e7956e 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_aio_writev and its dependencies.

Writes are mirrored num_children times on num_children devices.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

f70d7f7e 02/21/2014 11:29 pm Benoît Canet

blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify
mode. The patch extracts these functions in order to factorize the code.

Signed-off-by: Benoit Canet <>...

7db6982a 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_aio_readv.

Add code to do num_children reads in parallel and cleanup the structures
afterwards.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

27cec15e 02/21/2014 11:29 pm Benoît Canet

quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

Quorum is a block filter mirroring writes to num_children children.
For reads quorum reads each children and does a vote.
If more than vote_threshold versions are identical the quorum is reached and...

cadebd7a 02/21/2014 11:29 pm Benoît Canet

quorum: Create BDRVQuorumState and BlkDriver and do init.

Create the structure holding the quorum settings and write the minimal block
driver instanciation boilerplate.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>...

a8842e6d 02/21/2014 10:02 pm Paolo Bonzini

vmdk: extract vmdk_read_desc

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

d1833ef5 02/21/2014 10:02 pm Paolo Bonzini

vmdk: push vmdk_read_desc up to caller

Currently, we just try reading a VMDK file as both image and descriptor.
This makes it hard to choose which of the two attempts gave the best error.
We'll decide in advance if the file looks like an image or a descriptor,...

37f09e5e 02/21/2014 10:02 pm Paolo Bonzini

vmdk: do not try opening a file as both image and descriptor

This prepares for propagating errors from vmdk_open_sparse and
vmdk_open_desc_file up to the caller of vmdk_open.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>...

89ac8480 02/21/2014 10:02 pm Paolo Bonzini

vmdk: correctly propagate errors

Now that we can return the "right" errors, use the Error** parameter
to pass them back instead of just printing them.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

76abe407 02/21/2014 10:02 pm Paolo Bonzini

block: do not abuse EMEDIUMTYPE

Returning "Wrong medium type" for an image that does not have a valid
header is a bit weird. Improve the error by mentioning what format
was trying to open it.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>...

5b7aa9b5 02/21/2014 10:02 pm Paolo Bonzini

vdi: say why an image is bad

Instead of just putting it in debugging output, we can now put the
value in an Error.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

35cb1748 02/21/2014 10:02 pm Paolo Bonzini

iscsi: fix indentation

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

f2917853 02/21/2014 10:02 pm Paolo Bonzini

iscsi: correctly propagate errors in iscsi_open

Before:
$ ./qemu-io-old
qemu-io-old> open -r -o file.driver=iscsi,file.filename=foo
Failed to parse URL : foo
qemu-io-old: can't open device (null): Could not open 'foo': Invalid argument

After:...

24897a76 02/21/2014 10:02 pm Paolo Bonzini

gluster: default scheme to gluster:// and host to localhost.

Currently, "gluster:///volname/img" and (using file. options)
"file.driver=gluster,file.filename=foo" will segfault. Also,
"//host/volname/img" will be rejected, but it is a valid URL
that should be accepted just fine with "file.driver=gluster"....

a7451cb8 02/21/2014 10:02 pm Paolo Bonzini

gluster: correctly propagate errors

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

f8d924e4 02/21/2014 10:02 pm Paolo Bonzini

cow: correctly propagate errors

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

2a94fee3 02/21/2014 10:02 pm Paolo Bonzini

curl: correctly propagate errors

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

b6d5066d 02/21/2014 10:02 pm Paolo Bonzini

qcow: correctly propagate errors

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

0fea6b79 02/21/2014 10:02 pm Paolo Bonzini

qed: correctly propagate errors

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

6890aad4 02/21/2014 10:02 pm Paolo Bonzini

vhdx: correctly propagate errors

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

c0f92b52 02/21/2014 10:02 pm Paolo Bonzini

vvfat: correctly propagate errors

Before:
$ ./qemu-io-old
qemu-io-old> open -r -o driver=vvfat,fat-type=24,dir=i386-softmmu
Valid FAT types are only 12, 16 and 32
qemu-io-old: can't open device (null): Could not open image: Invalid argument...

ddf5636d 02/21/2014 10:02 pm Max Reitz

block: Add reference parameter to bdrv_open()

Allow bdrv_open() to handle references to existing block devices just as
bdrv_file_open() is already capable of.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

2e40134b 02/21/2014 10:02 pm Max Reitz

block: Make bdrv_file_open() static

Add the bdrv_open() option BDRV_O_PROTOCOL which results in passing the
call to bdrv_file_open(). Additionally, make bdrv_file_open() static and
therefore bdrv_open() the only way to call it.

Consequently, all existing calls to bdrv_file_open() have to be adjusted...

f7d9fd8c 02/21/2014 10:02 pm Max Reitz

block: Remove bdrv_open_image()'s force_raw option

This option is now unnecessary since specifying BDRV_O_PROTOCOL as flag
will do exactly the same.

Signed-off-by: Max Reitz <>
Reviewed-by: Benoit Canet <>
Reviewed-by: Kevin Wolf <>...

a69d9af4 02/21/2014 10:02 pm Paolo Bonzini

nbd: produce a better error if neither host nor port is passed

Before:
$ qemu-io-old
qemu-io-old> open -r -o file.driver=nbd
qemu-io-old: can't open device (null): Could not open image: Invalid argument
$ ./qemu-io-old
qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar...

77e8b9ca 02/21/2014 10:02 pm Paolo Bonzini

nbd: correctly propagate errors

Before:
$ ./qemu-io-old
qemu-io-old> open -r -o file.driver=nbd
one of path and host must be specified.
qemu-io-old: can't open device (null): Could not open image: Invalid argument
$ ./qemu-io-old
qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar...

a71835a0 02/21/2014 10:02 pm Kevin Wolf

qcow2: Set zero flag for discarded clusters

Instead of making the backing file contents visible again after a discard
request, set the zero flag if possible (i.e. on version >= 3).

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

f67503e5 02/21/2014 10:02 pm Max Reitz

block: Change BDS parameter of bdrv_open() to **

Make bdrv_open() take a pointer to a BDS pointer, similarly to
bdrv_file_open(). If a pointer to a NULL pointer is given, bdrv_open()
will create a new BDS with an empty name; if the BDS pointer is not
NULL, that existing BDS will be reused (in the same way as bdrv_open()...

6ebc91e5 02/20/2014 02:12 pm Fam Zheng

block: use per-object cflags and libs

No longer adds flags and libs for them to global variables, instead
create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is
used as per object cflags and libs.

This removes unwanted dependencies from libcacard....

4c0c9bbe 02/20/2014 02:10 pm Peter Maydell

Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging

  • remotes/qmp-unstable/queue/qmp:
    monitor: Add object_add class argument completion.
    monitor: Add object_del id argument completion.
    monitor: Add device_add device argument completion....
84d18f06 02/17/2014 06:57 pm Markus Armbruster

Use error_is_set() only when necessary

error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out. Unnecessarily hard for
optimizers, static checkers, and human readers. Dumb it down to
obvious.

Gets rid of several dozen Coverity false positives....

cc67f4d1 02/14/2014 07:05 pm Jeff Cody

block: mirror - use local_err to avoid NULL errp

When starting a block job, commit_active_start() relies on whether *errp
is set by mirror_start_job. This allows it to determine if the mirror
job start failed, so that it can clean up any changes to open flags from...

39a611a3 02/14/2014 07:05 pm Jeff Cody

block: Don't throw away errno via error_setg

There are a handful of places in the block layer where a failure path
has a valid -errno value, yet error_setg() is used. Those instances
should instead use error_setg_errno(), to preserve as much error
information as possible....

28f106af 02/14/2014 02:38 pm Jeff Cody

block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare

iSCSI currently does not need to do any actions to support the
current usage of bdrv_reopen(). However, it is important to note
a couple of things: 1.) A connection will not be re-established to...

16f0587e 02/09/2014 10:12 am Hu Tao

qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()

n_start can be actually calculated from offset. The number of
sectors to be allocated(n_end - n_start) can be passed in in
num. By removing n_start and n_end, we can save two parameters.

The side effect is there is a bug in qcow2.c:preallocate() that...

33304ec9 02/09/2014 10:12 am Hu Tao

qcow2: fix offset overflow in qcow2_alloc_clusters_at()

When cluster size is big enough it can lead to an offset overflow
in qcow2_alloc_clusters_at(). This patch fixes it.

The allocation is stopped each time at L2 table boundary
(see handle_alloc()), so the possible maximum bytes could be...

7c2bbf4a 02/09/2014 10:12 am Hu Tao

qcow2: check for NULL l2meta

In the case of a metadata preallocation with a large cluster size,
qcow2_alloc_cluster_offset() can allocate nothing and returns a
NULL l2meta. This patch checks for it and link2 l2 with only valid
l2meta.

Replace 9 and 512 with BDRV_SECTOR_BITS, BDRV_SECTOR_SIZE...

ad6aef43 02/09/2014 10:12 am Kevin Wolf

raw: Fix BlockLimits passthrough

raw copies over the BlockLimits of bs->file during bdrv_open().
However, since commit d34682cd it is immediately overwritten during
bdrv_refresh_limits(). This caused all fields except for
opt_transfer_length and opt_mem_alignment (which happen to be correctly...

eaf944a4 02/09/2014 10:12 am Kevin Wolf

blkdebug: Don't leak bs->file on failure

Reported-by: Laszlo Ersek <>
Signed-off-by: Kevin Wolf <>
Reviewed-by: Laszlo Ersek <>

6542aa9c 02/09/2014 10:12 am Peter Lieven

block: add native support for NFS

This patch adds native support for accessing images on NFS
shares without the requirement to actually mount the entire
NFS share on the host.

NFS Images can simply be specified by an url of the form:
nfs://<host>/<export>/<filename>[?param=value[&param2=value2[&...]]]...

5d259fc7 02/09/2014 10:12 am Peter Lieven

block/iscsi: always fill bs->bl.opt_transfer_length

the opt_transfer_length has nothing to do with logical
block provisioning stuff so always copy it from
the block limits VPD page.

Reported-By: Benoit Canet <>
Signed-off-by: Peter Lieven <>...

55aff7f1 01/31/2014 11:05 pm Jeff Cody

block: remove QED .bdrv_make_empty implementation

The QED .bdrv_make_empty() implementation does nothing but return
-ENOTSUP, which causes problems in bdrv_commit(). Since the function
stub exists for QED, it is called, which then always returns an error....

14b4a8b9 01/31/2014 11:05 pm Jeff Cody

block: remove qcow2 .bdrv_make_empty implementation

The QCOW2 .bdrv_make_empty implementation always returns 0 for success,
but does not actually do anything.

The proper way to not support an optional driver function stub is to
just not implement it, so let's remove the stub....

f43aa8e1 01/31/2014 11:05 pm Peter Lieven

block/vmdk: add basic .bdrv_check support

this adds a basic vmdk corruption check. it should detect severe
table corruptions and file truncation.

Signed-off-by: Peter Lieven <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

f50159fa 01/31/2014 11:05 pm Markus Armbruster

block/vhdx: Error checking fixes

Errors are inadvertently ignored in a few places. Has always been
broken. Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

e9f526ab 01/25/2014 01:50 am Anthony Liguori

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

  • bonzini/scsi-next:
    scsi: Support TEST UNIT READY in the dummy LUN0
    block: add .bdrv_reopen_prepare() stub for iscsi
    virtio-scsi: Prevent assertion on missed events
    virtio-scsi: Cleanup of I/Os that never started...
9e1cb96d 01/24/2014 06:40 pm Kevin Wolf

qemu-iotests: Test pwritev RMW logic

Signed-off-by: Kevin Wolf <>
Reviewed-by: Max Reitz <>

2c9880c4 01/24/2014 06:40 pm Paolo Bonzini

iscsi: Set bs->request_alignment

The iSCSI backend already gets the block size from the READ CAPACITY
command it sends. Save it so that the generic block layer gets it
too.

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

b35ee7fb 01/24/2014 06:40 pm Kevin Wolf

blkdebug: Make required alignment configurable

The new 'align' option of blkdebug can be used in order to emulate
backends with a required 4k alignment on hosts which only really require
512 byte alignment.

Signed-off-by: Kevin Wolf <>

c25f53b0 01/24/2014 06:40 pm Paolo Bonzini

raw: Probe required direct I/O alignment

Add a bs->request_alignment field that contains the required
offset/length alignment for I/O requests and fill it in the raw block
drivers. Use ioctls if possible, else see what alignment it takes for
O_DIRECT to succeed....

793ed47a 01/24/2014 06:40 pm Kevin Wolf

block: Switch BdrvTrackedRequest to byte granularity

Signed-off-by: Kevin Wolf <>
Reviewed-by: Max Reitz <>
Reviewed-by: Benoit Canet <>

d34682cd 01/24/2014 06:40 pm Kevin Wolf

block: Move initialisation of BlockLimits to bdrv_refresh_limits()

This function separates filling the BlockLimits from bdrv_open(), which
allows it to call it from other operations which may change the limits
(e.g. modifications to the backing file chain or bdrv_reopen)...

355ef4ac 01/24/2014 06:40 pm Kevin Wolf

block: Update BlockLimits when they might have changed

When reopening with different flags, or when backing files disappear
from the chain, the limits may change. Make sure they get updated in
these cases.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Wenchao Xia <>...

4da83585 01/24/2014 05:12 pm Jeff Cody

block: resize backing image during active layer commit, if needed

If the top image to commit is the active layer, and also larger than
the base image, then an I/O error will likely be returned during
block-commit.

For instance, if we have a base image with a virtual size 10G, and a...

c13163fb 01/24/2014 05:07 pm Benoît Canet

qmp: Add QMP query-named-block-nodes to list the named BlockDriverState nodes.

Signed-off-by: Benoit Canet <>
Reviewed-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

212a5a8f 01/24/2014 05:07 pm Benoît Canet

block: Create authorizations mechanism for external snapshot and resize.

Signed-off-by: Benoit Canet <>
Signed-off-by: Kevin Wolf <>

031fd1be 01/24/2014 05:07 pm Peter Maydell

block/curl: Implement the libcurl timer callback interface

libcurl versions 7.16.0 and later have a timer callback interface which
must be implemented in order for libcurl to make forward progress (it
will sometimes rely on being called back on the timeout if there are...

c8059b97 01/24/2014 03:33 pm Fam Zheng

qapi: Add "backing" to BlockStats

Currently there is no way to query BlockStats of the backing chain. This
adds "backing" field into BlockStats to make it possible.

The comment of "parent" is reworded.

Signed-off-by: Fam Zheng <>
Reviewed-by: Benoit Canet <>...

46bae927 01/24/2014 03:33 pm Hu Tao

qcow2: fix wrong value of L1E_OFFSET_MASK, L2E_OFFSET_MASK and REFT_OFFSET_MASK

Accoring to qcow spec, the offset fields in l1e, l2e and ref table entry
start at bit 9. The offset is cluster offset, and the smallest possible
cluster size is 512 bytes.

Signed-off-by: Hu Tao <>...

34ceed81 01/24/2014 03:33 pm Fam Zheng

vmdk: Check for overhead when opening

Report an error if file size is even smaller than metadata.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

9cd76737 01/24/2014 03:33 pm Liu Yuan

sheepdog: fix 'qemu-img map'

It was muted in the previous commit 4bc74be9. Let's revive it since nothing
prevents us to do it.

With this patch, following command will work as other formats:

$ qemu-img map sheepdog:image

Cc:
Cc: Kevin Wolf <>...

6df3bf8e 01/24/2014 03:33 pm Zhang Min

drive mirror:fix memory leak

In the function mirror_iteration() > qemu_iovec_init(),
it allocates memory for op
>qiov.iov, when the write request calls back,
but in the function mirror_iteration_done(), it only frees the op,
not free the op->qiov.iov, so this causes memory leak....

d8a7b061 01/24/2014 03:33 pm Fam Zheng

vmdk: Fix format specific information (create type) for streamOptimized

Previously the field is wrong:

$ ./qemu-img create -f vmdk -o subformat=streamOptimized /tmp/a.vmdk 1G
$ ./qemu-img info /tmp/a.vmdk
image: /tmp/a.vmdk
file format: vmdk...
4373593d 01/22/2014 01:07 pm Max Reitz

blkdebug: Allow command-line file configuration

Introduce the "image" option as an alternative to specifying the image
through the filename.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

70b6198a 01/22/2014 01:07 pm Max Reitz

blkverify: Allow command-line configuration

Introduce the "test" and "raw" options for specifying images.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

22511ad6 01/22/2014 01:07 pm Max Reitz

blkverify: Don't require protocol filename

If the filename is not prefixed by "blkverify:" in
blkverify_parse_filename(), the blkverify driver was not selected
through that protocol prefix, but by an explicit command line (or QMP)
option (like driver=blkverify)....

466b49f2 01/22/2014 01:07 pm Max Reitz

blkdebug: Use errp for read_config()

Use an Error variable in the read_config() function.

Signed-off-by: Max Reitz <>
Reviewed-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>
Signed-off-by: Kevin Wolf <>

d4881b9b 01/22/2014 01:07 pm Max Reitz

blkdebug: Don't require sophisticated filename

If the filename is not prefixed by "blkdebug:" in
blkdebug_parse_filename(), the blkdebug driver was not selected through
that protocol prefix, but by an explicit command line option
(file.driver=blkdebug or something similar). Contrary to the current...

85a040e5 01/22/2014 01:07 pm Max Reitz

blkdebug: Always call read_config()

Move the check whether there actually is a config file into the
read_config() function.

Signed-off-by: Max Reitz <>
Reviewed-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>...

89f2b21e 01/22/2014 01:07 pm Max Reitz

blkdebug: Use command-line in read_config()

Use qemu_config_parse_qdict() to parse the command-line options in
addition to the config file.

Signed-off-by: Max Reitz <>
Reviewed-by: Kevin Wolf <>
Signed-off-by: Kevin Wolf <>

72daa72e 01/22/2014 01:07 pm Max Reitz

block: Allow reference for bdrv_file_open()

Allow specifying a reference to an existing block device (by name) for
bdrv_file_open() instead of a filename and/or options.

Signed-off-by: Max Reitz <>
Reviewed-by: Kevin Wolf <>...

e04fb07f 01/22/2014 01:07 pm Stefan Hajnoczi

rbd: switch from pipe to QEMUBH completion notification

rbd callbacks are called from non-QEMU threads. Up until now a pipe was
used to signal completion back to the QEMU iothread.

The pipe writer code handles EAGAIN using select(2). The select(2) API...

92397116 01/22/2014 01:07 pm Peter Lieven

block/iscsi: return -ENOMEM if an async call fails immediately

if an async libiscsi call fails directly it can only be due
to an out of memory condition. All other errors are returned
through the callback.

Signed-off-by: Peter Lieven <>
Reviewed-by: Ronnie Sahlberg <>...

15744b0b 01/22/2014 01:07 pm Bharata B Rao

gluster: Convert aio routines into coroutines

Convert the read, write, flush and discard implementations from aio-based
ones to coroutine based ones.

Signed-off-by: Bharata B Rao <>
Signed-off-by: Stefan Hajnoczi <>...

7c815372 01/22/2014 01:07 pm Bharata B Rao

gluster: Implement .bdrv_co_write_zeroes for gluster

Support .bdrv_co_write_zeroes() from gluster driver by using GlusterFS API
glfs_zerofill() that off-loads the writing of zeroes to GlusterFS server.

Signed-off-by: Bharata B Rao <>...

cf7f616b 01/22/2014 01:07 pm Bharata B Rao

gluster: Add support for creating zero-filled image

GlusterFS supports creation of zero-filled file on GlusterFS volume
by means of an API called glfs_zerofill(). Use this API from QEMU to
create an image that is filled with zeroes by using the preallocation...

9f23fce7 01/22/2014 01:07 pm Liu Yuan

sheepdog: fix clone operation by 'qemu-img create -b'

We should pass base_inode->vdi_id to base_vdi_id of SheepdogVdiReq so that sheep
can create a clone instead a fresh volume.

This fixes following command:

qemu-create -b sheepdog:base sheepdog:clone
...

585ea0c8 01/22/2014 01:07 pm Fam Zheng

vmdk: Fix big flat extent IO

Local variable "n" as int64_t avoids overflow with large sector number
calculation. See test case change for failure case.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

dc6afb99 01/15/2014 11:44 am Jeff Cody

block: add .bdrv_reopen_prepare() stub for iscsi

To suppport reopen(), the .bdrv_reopen_prepare() stub must exist.
iSCSI does not have anything that needs to be done to support reopen,
so we can just implement the _prepare() stub.

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