Block patches
[Qemu-devel] [PULL 65/73] iotests: Drop vpc from 004's and 104's format list
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
Both tests require the test image to have a specific size; this cannot be guaranteed by vpc (unless tuning the test specifically for that format).
It is safe to exclude vpc from 004 because what is tested there is implemented in a generic part in the block layer and not format-specific.
It is safe to exclude vpc from 104 because for vpc basically every image size is "unaligned", so if that would break at some point in time, we would quickly notice just by running the generic tests.
--- tests/qemu-iotests/004 | 2 +- tests/qemu-iotests/104 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/004 +1 -1
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.rc . ./common.filter -_supported_fmt generic +_supported_fmt raw qcow qcow2 qed vdi vmdk vhdx _supported_proto generic _supported_os Linux
tests/qemu-iotests/104 +1 -1
@@ -34,7 +34,7 @@ trap "exit \$status" 0 1 2 3 15 . ./common.rc . ./common.filter -_supported_fmt generic +_supported_fmt raw qcow qcow2 qed vdi vmdk vhdx _supported_proto generic _supported_os Linux
Signature · 1 line
1.8.3.1
Hi Peter,
I hope this fixes the build problems in Stefan's pull request. I'm only posting those patches that are new compared to Stefan's version, or that have actual differences (the fixed build errors; not reposting for my added Signed-off-by).
Kevin
The following changes since commit 6608c7e9eb65727524f6f590b1e716ec6e7877d4:
Merge remote-tracking branch 'remotes/xtensa/tags/20150307-xtensa' into staging (2015-03-08 14:32:38 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to 305a8e96908c89a926438e1c4b738b296ee12061:
MAINTAINERS: Add jcody as blockjobs, block devices maintainer (2015-03-09 16:33:44 +0100)
----------------------------------------------------------------
Block patches for 2.3
----------------------------------------------------------------
Christian Borntraeger (1):
Add testcase for scsi-hd devices without drive property
Denis V. Lunev (1):
block/raw-posix: fix compilation warning on OSX
Ekaterina Tumanova (6):
block: add bdrv functions for geometry and blocksize
raw-posix: Factor block size detection out of raw_probe_alignment()
block: Add driver methods to probe blocksizes and geometry
block-backend: Add wrappers for blocksizes and geometry probing
BlockConf: Call backend functions to detect geometry and blocksizes
scsi-hd: fix property unset case
Fam Zheng (2):
virtio-blk: Check return value of blk_aio_ioctl
virtio-blk: Remove the stale FIXME comment
Jeff Cody (1):
MAINTAINERS: Add jcody as blockjobs, block devices maintainer
John Snow (11):
blkdebug: fix "once" rule
ahci: Migrate IDEStatus
ahci: Recompute cur_cmd on migrate post load qtest/ide: Test flush / retry for ISA and PCI libqos/ahci: Zero-fill AHCI headers qtest/ahci: Add a macro bootup routine libqos/ahci: add ahci command helpers qtest/ahci: Add DMA test variants qtest/ahci: Add PIO and LBA48 tests qtest/ahci: add fragmented dma test
MAINTAINERS: Add jsnow as IDE maintainer
Kevin Wolf (5):
coroutine: Fix use after free with qemu_coroutine_yield()
coroutine: Clean up qemu_coroutine_enter()
vpc: Fix size in fixed image creation
vpc: Implement bdrv_co_get_block_status()
qcow2: Remove unused struct QCowCreateState
Liu Yuan (1):
sheepdog: fix confused return values
Marc Marí (7):
libqos: Change use of pointers to uint64_t in virtio
tests: Prepare virtio-blk-test for multi-arch implementation
libqos: Remove PCI assumptions in constants of virtio driver
libqos: Add malloc generic
libqos: Add virtio MMIO support
libqos: Solve bug in interrupt checking when using MSIX in virtio-pci.c
tests: Check QVIRTIO_F_ANY_LAYOUT flag in virtio-blk test
Markus Armbruster (1):
sheepdog: Fix misleading error messages in sd_snapshot_create()
Max Reitz (19):
qcow2: Add two new fields to BDRVQcowState
qcow2: Add refcount_bits to format-specific info
qcow2: Do not return new value after refcount update
qcow2: Only return status from qcow2_get_refcount
qcow2: Use unsigned addend for update_refcount()
qcow2: Use 64 bits for refcount values
qcow2: Helper for refcount array reallocation
qcow2: Helper function for refcount modification
qcow2: More helpers for refcount modification
qcow2: Open images with refcount order != 4
qcow2: refcount_order parameter for qcow2_create2
qcow2: Use symbolic macros in qcow2_amend_options
iotests: Prepare for refcount_bits option
qcow2: Allow creation with refcount order != 4
iotests: Add test for different refcount widths
iotests: Fix 051's reference output
iotests: Remove 006
iotests: Drop vpc from 004's and 104's format list block/vdi: Add locking for parallel requests
Paolo Bonzini (14):
ide: start extracting ide_restart_dma out of bmdma_restart_dma
ide: prepare to move restart to common code
ide: introduce ide_register_restart_cb
ide: do not use BMDMA in restart callback
ide: pass IDEBus to the restart_cb
ide: move restart callback to common code
ide: remove restart_cb callback
ide: replace set_unit callback with more IDEBus state
ide: place initial state of the current request to IDEBus
ide: migrate initial request state via IDEBus
ide: commonize io_buffer_index initialization
ide: make more functions static
ide: support PIO restart for the ISA controller
ahci: add support for restarting non-queued commands
Stefan Hajnoczi (3):
test-coroutine: Regression test for yield bug block/raw-posix: fix launching with failed disks
iotests: add O_DIRECT alignment probing test
Teruaki Ishizaki (1):
sheepdog: selectable object size support
MAINTAINERS | 63 ++++-
block.c | 34 +++
block/blkdebug.c | 6 +-
block/block-backend.c | 10 +
block/qcow2-cluster.c | 11 +-
block/qcow2-refcount.c | 545 +++++++++++++++++++++++++++------------
block/qcow2.c | 111 +++++---
block/qcow2.h | 32 ++-
block/raw-posix.c | 185 +++++++++++--
block/raw_bsd.c | 12 +
block/sheepdog.c | 171 ++++++++++--
block/vdi.c | 25 ++
block/vpc.c | 60 ++++-
hw/block/block.c | 24 ++
hw/block/hd-geometry.c | 10 +-
hw/block/nvme.c | 1 +
hw/block/virtio-blk.c | 17 +-
hw/core/qdev-properties.c | 3 +-
hw/ide/ahci.c | 43 +--
hw/ide/atapi.c | 3 +-
hw/ide/cmd646.c | 3 +-
hw/ide/core.c | 116 ++++++++-
hw/ide/internal.h | 16 +-
hw/ide/isa.c | 3 +-
hw/ide/macio.c | 6 -
hw/ide/pci.c | 109 ++------
hw/ide/pci.h | 12 +-
hw/ide/piix.c | 3 +-
hw/ide/qdev.c | 1 +
hw/ide/via.c | 3 +-
hw/scsi/scsi-disk.c | 7 +
hw/usb/dev-storage.c | 1 +
include/block/block.h | 13 +
include/block/block_int.h | 17 ++
include/block/coroutine_int.h | 1 +
include/hw/block/block.h | 5 +-
include/hw/qdev-properties.h | 4 +-
include/sysemu/block-backend.h | 2 +
qapi/block-core.json | 5 +-
qemu-coroutine.c | 38 ++-
tests/Makefile | 4 +-
tests/ahci-test.c | 234 +++++++++++++++--
tests/ide-test.c | 20 +-
tests/libqos/ahci.c | 44 +++-
tests/libqos/ahci.h | 5 +
tests/libqos/malloc-generic.c | 39 +++
tests/libqos/malloc-generic.h | 21 ++
tests/libqos/virtio-mmio.c | 198 ++++++++++++++
tests/libqos/virtio-mmio.h | 46 ++++
tests/libqos/virtio-pci.c | 66 +++--
tests/libqos/virtio-pci.h | 24 +-
tests/libqos/virtio.c | 8 +-
tests/libqos/virtio.h | 16 +-
tests/qemu-iotests/004 | 2 +-
tests/qemu-iotests/006.out | 6 -
tests/qemu-iotests/007 | 3 +
tests/qemu-iotests/015 | 2 +
tests/qemu-iotests/026 | 7 +
tests/qemu-iotests/026.out | 24 +-
tests/qemu-iotests/029 | 2 +
tests/qemu-iotests/049.out | 108 ++++----
tests/qemu-iotests/051 | 9 +
tests/qemu-iotests/051.out | 17 +-
tests/qemu-iotests/058 | 2 +
tests/qemu-iotests/060.out | 1 +
tests/qemu-iotests/065 | 23 +-
tests/qemu-iotests/067 | 2 +
tests/qemu-iotests/067.out | 5 +
tests/qemu-iotests/079 | 10 +-
tests/qemu-iotests/079.out | 38 +--
tests/qemu-iotests/080 | 2 +
tests/qemu-iotests/082.out | 48 +++-
tests/qemu-iotests/085.out | 38 +--
tests/qemu-iotests/089 | 2 +
tests/qemu-iotests/089.out | 2 +
tests/qemu-iotests/104 | 2 +-
tests/qemu-iotests/108 | 2 +
tests/qemu-iotests/112 | 187 ++++++++++++++
tests/qemu-iotests/112.out | 84 ++++++
tests/qemu-iotests/{006 => 128} | 46 +++-
tests/qemu-iotests/128.out | 5 +
tests/qemu-iotests/common.filter | 3 +-
tests/qemu-iotests/group | 4 +-
tests/test-coroutine.c | 26 ++
tests/virtio-blk-test.c | 329 +++++++++++++++--------
85 files changed, 2675 insertions(+), 822 deletions(-)
create mode 100644 tests/libqos/malloc-generic.c
create mode 100644 tests/libqos/malloc-generic.h
create mode 100644 tests/libqos/virtio-mmio.c
create mode 100644 tests/libqos/virtio-mmio.h
delete mode 100644 tests/qemu-iotests/006.out
create mode 100755 tests/qemu-iotests/112
create mode 100644 tests/qemu-iotests/112.out
rename tests/qemu-iotests/{006 => 128} (52%)
create mode 100644 tests/qemu-iotests/128.out[Qemu-devel] [PULL 62/73] virtio-blk: Remove the stale FIXME comment
From: Fam Zheng <[email protected]>
By default, we have ioeventfd enabled, so the IO request processing is in IO thread; in the vcpu thread, guest mode is returned to as quickly as possible, and completion is delivered via irqfd. Therefore this comment from the initial implementation is barely relevant.
--- hw/block/virtio-blk.c | 6 ------ 1 file changed, 6 deletions(-)
hw/block/virtio-blk.c +0 -6
@@ -597,12 +597,6 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)if (mrb.num_reqs) {virtio_blk_submit_multireq (s->blk, &mrb); } - -/* -* FIXME: Want to check for completions before returning to guest mode, -* so cached reads and writes are reported as quickly as possible. But -* that should be done in the generic block layer. -*/ }static void virtio_blk_dma_restart_bh (void *opaque)
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 70/73] MAINTAINERS: Add jsnow as IDE maintainer
In reply to Kevin WolfFrom: John Snow <[email protected]>
It has been proposed that the block layer be split up into smaller, more manageable portions to help speed up the review and merging of block layer patches.
As part of this process, I propose that I take over the IDE, ATA, ATAPI and FD devices.
As we split out the block layer, we will begin using the qemu-block mailing list as a catchall for all of the block layer subcomponents. Please CC [email protected] for all block layer patches, including any that touch the IDE/Floppy devices.
--- MAINTAINERS | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
MAINTAINERS +17 -3
@@ -605,11 +605,25 @@ S: Maintained F: hw/misc/edu.c IDE -M: Kevin Wolf <[email protected]> -M: Stefan Hajnoczi <[email protected]> -S: Odd Fixes +M: John Snow <[email protected]> +L: [email protected] +S: Supported F: include/hw/ide.h F: hw/ide/ +F: hw/block/block.c +F: hw/block/cdrom.c +F: hw/block/hd-geometry.c +F: tests/ide-test.c +F: tests/ahci-test.c +T: git git://github.com/jnsnow/qemu.git ide + +Floppy +M: John Snow <[email protected]> +L: [email protected] +S: Supported +F: hw/block/fdc.c +F: include/hw/block/fdc.h +T: git git://github.com/jnsnow/qemu.git ide OMAP M: Peter Maydell <[email protected]>
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 63/73] iotests: Fix 051's reference output
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
Commit c4bacafb717de55538311b80a185ce9166b8daa2 changed (improved) qdev_init_nofail()'s error reporting, which affects iotest 051. Fix the reference output.
--- tests/qemu-iotests/051.out | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
tests/qemu-iotests/051.out +3 -6
@@ -115,8 +115,7 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive if=ide QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: Device needs media, but drive is empty -QEMU_PROG: Device initialization failed. -QEMU_PROG: Initialization of device ide-hd failed +QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed. Testing: -drive if=virtio QEMU X.Y.Z monitor - type 'help' for more information
@@ -127,8 +126,7 @@ QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized Testing: -drive if=scsi QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty -QEMU_PROG: Device initialization failed. -QEMU_PROG: Initialization of device lsi53c895a failed +QEMU_PROG: Initialization of device lsi53c895a failed: Device initialization failed. Testing: -drive if=none,id=disk -device ide-cd,drive=disk QEMU X.Y.Z monitor - type 'help' for more information
@@ -178,8 +176,7 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: Can't use a read-only drive -QEMU_PROG: Device initialization failed. -QEMU_PROG: Initialization of device ide-hd failed +QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed. Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on QEMU X.Y.Z monitor - type 'help' for more information
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 71/73] block/raw-posix: fix launching with failed disks
In reply to Kevin WolfFrom: Stefan Hajnoczi <[email protected]>
Since commit c25f53b06eba1575d5d0e92a0132455c97825b83 ("raw: Probe required direct I/O alignment") QEMU has failed to launch if image files produce I/O errors.
Previously, QEMU would launch successfully and the guest would see the errors when attempting I/O.
This is a regression and may prevent multipath I/O inside the guest, where QEMU must launch and let the guest figure out by itself which disks are online.
Tweak the alignment probing code in raw-posix.c to explicitly look for EINVAL on Linux instead of bailing. The kernel refuses misaligned requests with this error code and other error codes can be ignored.
--- block/raw-posix.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-)
block/raw-posix.c +27 -2
@@ -272,6 +272,31 @@ static int probe_physical_blocksize(int fd, unsigned int *blk_size)#endif } +/* Check if read is allowed with given memory buffer and length. +* +* This function is used to check O_DIRECT memory buffer and request alignment. +*/ +static bool raw_is_io_aligned (int fd,void *buf,size_t len) +{ +ssize_t ret =pread (fd, buf, len,0 ); + +if (ret >=0 ) { +return true; + } + +#ifdef __linux__ +/* The Linux kernel returns EINVAL for misaligned O_DIRECT reads. Ignore +* other errors (e.g. real I/O error), which could happen on a failed +* drive, since we only care about probing alignment. +*/ +if (errno !=EINVAL ) { +return true; + } +#endif + +return false; +} +static void raw_probe_alignment (BlockDriverState *bs,int fd,Error **errp) {BDRVRawState *s = bs->opaque;
@@ -307,7 +332,7 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)size_t align; buf =qemu_memalign (MAX_BLOCKSIZE ,2 *MAX_BLOCKSIZE );for (align =512 ; align <=MAX_BLOCKSIZE ; align <<=1 ) { -if (pread (fd, buf + align,MAX_BLOCKSIZE ,0 ) >=0 ) { +if (raw_is_io_aligned (fd, buf + align,MAX_BLOCKSIZE )) { s->buf_align = align;break ; }
@@ -319,7 +344,7 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)size_t align; buf =qemu_memalign (s->buf_align,MAX_BLOCKSIZE );for (align =512 ; align <=MAX_BLOCKSIZE ; align <<=1 ) { -if (pread (fd, buf, align,0 ) >=0 ) { +if (raw_is_io_aligned (fd, buf, align)) { bs->request_alignment = align;break ; }
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 66/73] block/vdi: Add locking for parallel requests
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
When allocating a new cluster, the first write to it must be the one doing the allocation, because that one pads its write request to the cluster size; if another write to that cluster is executed before it, that write will be overwritten due to the padding.
See https://bugs.launchpad.net/qemu/+bug/1422307 for what can go wrong without this patch.
--- block/vdi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
block/vdi.c +25 -0
@@ -53,6 +53,7 @@#include "block/block_int.h" #include "qemu/module.h" #include "migration/migration.h" +#include "block/coroutine.h" #if defined(CONFIG_UUID )#include <uuid/uuid.h>
@@ -196,6 +197,8 @@ typedef struct {/* VDI header (converted to host endianness). */ VdiHeader header; +CoMutex write_lock; +Error *migration_blocker; } BDRVVdiState;
@@ -504,6 +507,8 @@ static int vdi_open(BlockDriverState *bs, QDict *options, int flags, "vdi", bdrv_get_device_name(bs), "live migration");migrate_add_blocker (s->migration_blocker); +qemu_co_mutex_init (&s->write_lock); +return 0 ; fail_free_bmap:
@@ -639,11 +644,31 @@ static int vdi_co_write(BlockDriverState *bs, buf, n_sectors * SECTOR_SIZE);memset (block + (sector_in_block + n_sectors) *SECTOR_SIZE ,0 , (s->block_sectors - n_sectors - sector_in_block) *SECTOR_SIZE ); + +/* Note that this coroutine does not yield anywhere from reading the +* bmap entry until here, so in regards to all the coroutines trying +* to write to this cluster, the one doing the allocation will +* always be the first to try to acquire the lock. +* Therefore, it is also the first that will actually be able to +* acquire the lock and thus the padded cluster is written before +* the other coroutines can write to the affected area. */ +qemu_co_mutex_lock (&s->write_lock); ret =bdrv_write (bs->file, offset, block, s->block_sectors); +qemu_co_mutex_unlock (&s->write_lock); }else {uint64_t offset = s->header.offset_data /SECTOR_SIZE + (uint64_t )bmap_entry * s->block_sectors + sector_in_block; +qemu_co_mutex_lock (&s->write_lock); +/* This lock is only used to make sure the following write operation +* is executed after the write issued by the coroutine allocating +* this cluster, therefore we do not need to keep it locked. +* As stated above, the allocating coroutine will always try to lock +* the mutex before all the other concurrent accesses to that +* cluster, therefore at this point we can be absolutely certain +* that that write operation has returned (there may be other writes +* in flight, but they do not concern this very operation). */ +qemu_co_mutex_unlock (&s->write_lock); ret =bdrv_write (bs->file, offset, buf, n_sectors); }
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 67/73] scsi-hd: fix property unset case
In reply to Kevin WolfFrom: Ekaterina Tumanova <[email protected]>
Commit c53659f0 ("BlockConf: Call backend functions to detect geometry and blocksizes") causes a segmentation fault on the invalid configuration of a scsi device without a drive.
Let's check for conf.blk before calling blkconf_blocksizes. The error will be handled later on in scsi_realize anyway.
--- hw/scsi/scsi-disk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
hw/scsi/scsi-disk.c +6 -1
@@ -2291,7 +2291,12 @@ static void scsi_realize(SCSIDevice *dev, Error **errp)static void scsi_hd_realize (SCSIDevice *dev,Error **errp) {SCSIDiskState *s =DO_UPCAST (SCSIDiskState, qdev, dev); -blkconf_blocksizes (&s->qdev.conf); +/* can happen for devices without drive. The error message for missing +* backend will be issued in scsi_realize +*/ +if (s->qdev.conf.blk) { +blkconf_blocksizes (&s->qdev.conf); + } s->qdev.blocksize = s->qdev.conf.logical_block_size; s->qdev.type =TYPE_DISK ;if (!s->product) {
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 72/73] iotests: add O_DIRECT alignment probing test
In reply to Kevin WolfFrom: Stefan Hajnoczi <[email protected]>
This test case checks that image files can be opened even if I/O produces EIO errors. QEMU should not refuse opening failed disks since the guest may be configured for multipath I/O where accessing failed disks is expected.
--- tests/qemu-iotests/128 | 82 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/128.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 88 insertions(+) create mode 100755 tests/qemu-iotests/128 create mode 100644 tests/qemu-iotests/128.out
tests/qemu-iotests/128 new file +82 -0
@@ -0,0 +1,82 @@ +#!/bin/bash +# +# Test that opening O_DIRECT succeeds when image file I/O produces EIO +# +# Copyright (C) 2015 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +# creator [email protected] + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! + +devname="eiodev$$" + +_setup_eiodev() +{ + # This test should either be run as root or with passwordless sudo + for cmd in "" "sudo -n"; do + echo "0 $((1024 * 1024 * 1024 / 512)) error" | \ + $cmd dmsetup create "$devname" 2>/dev/null + if [ "$?" -eq 0 ]; then + return + fi + done + _notrun "root privileges required to run dmsetup" +} + +_cleanup_eiodev() +{ + for cmd in "" "sudo -n"; do + $cmd dmsetup remove "$devname" 2>/dev/null + if [ "$?" -eq 0 ]; then + return + fi + done +} + +_cleanup() +{ + _cleanup_eiodev +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +_supported_fmt raw +_supported_proto file +_supported_os Linux + +_setup_eiodev + +TEST_IMG="/dev/mapper/$devname" + +echo +echo "== reading from error device ==" +# Opening image should succeed but the read operation should fail +$QEMU_IO --format "$IMGFMT" --nocache -c "read 0 65536" "$TEST_IMG" | _filter_qemu_io + +# success, all done +echo "*** done" +rm -f $seq.full +status=0
tests/qemu-iotests/128.out new file +5 -0
@@ -0,0 +1,5 @@ +QA output created by 128 + +== reading from error device == +read failed: Input/output error +*** done
tests/qemu-iotests/group +1 -0
@@ -121,3 +121,4 @@ 114 rw auto quick 116 rw auto quick 123 rw auto quick +128 rw auto quick
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 64/73] iotests: Remove 006
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
vpc does support images > 127 GB if done correctly. qemu does it correctly. Remove the test pretending otherwise.
--- tests/qemu-iotests/006 | 54 ---------------------------------------------- tests/qemu-iotests/006.out | 6 ------ tests/qemu-iotests/group | 2 +- 3 files changed, 1 insertion(+), 61 deletions(-) delete mode 100755 tests/qemu-iotests/006 delete mode 100644 tests/qemu-iotests/006.out
tests/qemu-iotests/006 deleted +0 -54
@@ -1,54 +0,0 @@ -#!/bin/bash -# -# Make sure qemu-img rejects > 127GB images for the vpc format as the format -# doesn't support this. -# -# Copyright (C) 2009 Red Hat, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -# creator [email protected] - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! - -_cleanup() -{ - _cleanup_test_img -} -trap "_cleanup; exit \$status" 0 1 2 3 15 - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt vpc -_supported_proto generic -_supported_os Linux - - -echo -echo "creating 128GB image" -_make_test_img 128G - -# success, all done -echo "*** done" -rm -f $seq.full -status=0
tests/qemu-iotests/006.out deleted +0 -6
@@ -1,6 +0,0 @@ -QA output created by 006 - -creating 128GB image -qemu-img: The image size is too large for file format 'vpc' -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=137438953472 -*** done
tests/qemu-iotests/group +1 -1
@@ -12,7 +12,7 @@ 003 rw auto 004 rw auto quick 005 img auto quick -006 img auto +# 006 was removed, do not reuse 007 snapshot auto 008 rw auto quick 009 rw auto quick
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 22/73] qcow2: Helper function for refcount modification
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
Since refcounts do not always have to be a uint16_t, all refcount blocks and arrays in memory should not have a specific type (thus they become pointers to void) and for accessing them, two helper functions are used (a getter and a setter). Those functions are called indirectly through function pointers in the BDRVQcowState so they may later be exchanged for different refcount orders.
With the check and repair functions using this function, the refcount array they are creating will be in big endian byte order; additionally, using realloc_refcount_array() makes the size of this refcount array always cluster-aligned. Both combined allow rebuild_refcount_structure() to drop the bounce buffer which was used to convert parts of the refcount array to big endian byte order and store them on disk. Instead, those parts can now be written directly.
[ kwolf: Fixed a build failure on 32 bit and another with old glib ]
--- block/qcow2-refcount.c | 126 ++++++++++++++++++++++++++++--------------------- block/qcow2.h | 8 ++++ 2 files changed, 81 insertions(+), 53 deletions(-)
block/qcow2-refcount.c +73 -53
@@ -32,6 +32,11 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, int64_t offset, int64_t length, uint64_t addend, bool decrease, enum qcow2_discard_type type); +static uint64_t get_refcount_ro4 (const void *refcount_array,uint64_t index); + +static void set_refcount_ro4 (void *refcount_array,uint64_t index, +uint64_t value); +/*********************************************************/ /* refcount handling */
@@ -42,6 +47,9 @@ int qcow2_refcount_init(BlockDriverState *bs)unsigned int refcount_table_size2, i;int ret; + s->get_refcount = &get_refcount_ro4; + s->set_refcount = &set_refcount_ro4; +assert (s->refcount_table_size <=INT_MAX /sizeof (uint64_t )); refcount_table_size2 = s->refcount_table_size *sizeof (uint64_t ); s->refcount_table =g_try_malloc (refcount_table_size2);
@@ -72,6 +80,19 @@ void qcow2_refcount_close(BlockDriverState *bs) } +static uint64_t get_refcount_ro4 (const void *refcount_array,uint64_t index) +{ +return be16_to_cpu (((const uint16_t *)refcount_array)[index]); +} + +static void set_refcount_ro4 (void *refcount_array,uint64_t index, +uint64_t value) +{ +assert (!(value >>16 )); + ((uint16_t *)refcount_array)[index] =cpu_to_be16 (value); +} + +static int load_refcount_block (BlockDriverState *bs,int64_t refcount_block_offset,void **refcount_block)
@@ -97,7 +118,7 @@ int qcow2_get_refcount(BlockDriverState *bs, int64_t cluster_index,uint64_t refcount_table_index, block_index;int64_t refcount_block_offset;int ret; -uint16_t *refcount_block; +void *refcount_block; refcount_table_index = cluster_index >> s->refcount_block_bits;if (refcount_table_index >= s->refcount_table_size) {
@@ -119,16 +140,15 @@ int qcow2_get_refcount(BlockDriverState *bs, int64_t cluster_index, } ret =qcow2_cache_get (bs, s->refcount_block_cache, refcount_block_offset, - (void **) &refcount_block); + &refcount_block);if (ret <0 ) {return ret; } block_index = cluster_index & (s->refcount_block_size -1 ); - *refcount =be16_to_cpu (refcount_block[block_index]); + *refcount = s->get_refcount (refcount_block, block_index); - ret =qcow2_cache_put (bs, s->refcount_block_cache, - (void **) &refcount_block); + ret =qcow2_cache_put (bs, s->refcount_block_cache, &refcount_block);if (ret <0 ) {return ret; }
@@ -172,7 +192,7 @@ static int in_same_refcount_block(BDRVQcowState *s, uint64_t offset_a,* Returns 0 on success or -errno in error case */ static int alloc_refcount_block (BlockDriverState *bs, -int64_t cluster_index,uint16_t **refcount_block) +int64_t cluster_index,void **refcount_block) {BDRVQcowState *s = bs->opaque;unsigned int refcount_table_index;
@@ -199,7 +219,7 @@ static int alloc_refcount_block(BlockDriverState *bs, }return load_refcount_block (bs, refcount_block_offset, - (void **) refcount_block); + refcount_block); } }
@@ -249,7 +269,7 @@ static int alloc_refcount_block(BlockDriverState *bs,if (in_same_refcount_block (s, new_block, cluster_index << s->cluster_bits)) {/* Zero the new refcount block before updating it */ ret =qcow2_cache_get_empty (bs, s->refcount_block_cache, new_block, - (void **) refcount_block); + refcount_block);if (ret <0 ) { goto fail_block; }
@@ -259,7 +279,7 @@ static int alloc_refcount_block(BlockDriverState *bs,/* The block describes itself, need to update the cache */ int block_index = (new_block >> s->cluster_bits) & (s->refcount_block_size -1 ); - (*refcount_block)[block_index] =cpu_to_be16 (1 ); + s->set_refcount (*refcount_block, block_index,1 ); }else {/* Described somewhere else. This can recurse at most twice before we * arrive at a block that describes itself. */
@@ -277,7 +297,7 @@ static int alloc_refcount_block(BlockDriverState *bs,/* Initialize the new refcount block only after updating its refcount, * update_refcount uses the refcount cache itself */ ret =qcow2_cache_get_empty (bs, s->refcount_block_cache, new_block, - (void **) refcount_block); + refcount_block);if (ret <0 ) { goto fail_block; }
@@ -311,7 +331,7 @@ static int alloc_refcount_block(BlockDriverState *bs,return -EAGAIN ; } - ret =qcow2_cache_put (bs, s->refcount_block_cache, (void **) refcount_block); + ret =qcow2_cache_put (bs, s->refcount_block_cache, refcount_block);if (ret <0 ) { goto fail_block; }
@@ -365,7 +385,7 @@ static int alloc_refcount_block(BlockDriverState *bs, s->cluster_size;uint64_t table_offset = meta_offset + blocks_clusters * s->cluster_size;uint64_t *new_table =g_try_new0 (uint64_t, table_size); -uint16_t *new_blocks =g_try_malloc0 (blocks_clusters * s->cluster_size); +void *new_blocks =g_try_malloc0 (blocks_clusters * s->cluster_size);assert (table_size >0 && blocks_clusters >0 );if (new_table ==NULL || new_blocks ==NULL ) {
@@ -387,7 +407,7 @@ static int alloc_refcount_block(BlockDriverState *bs,uint64_t table_clusters =size_to_clusters (s, table_size *sizeof (uint64_t ));int block =0 ;for (i =0 ; i < table_clusters + blocks_clusters; i++) { - new_blocks[block++] =cpu_to_be16 (1 ); + s->set_refcount (new_blocks, block++,1 ); }/* Write refcount blocks to disk */
@@ -440,7 +460,7 @@ static int alloc_refcount_block(BlockDriverState *bs,qcow2_free_clusters (bs, old_table_offset, old_table_size *sizeof (uint64_t ),QCOW2_DISCARD_OTHER ); - ret =load_refcount_block (bs, new_block, (void **) refcount_block); + ret =load_refcount_block (bs, new_block, refcount_block);if (ret <0 ) {return ret; }
@@ -455,7 +475,7 @@ fail_table:g_free (new_table); fail_block:if (*refcount_block !=NULL ) { -qcow2_cache_put (bs, s->refcount_block_cache, (void **) refcount_block); +qcow2_cache_put (bs, s->refcount_block_cache, refcount_block); }return ret; }
@@ -541,7 +561,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, {BDRVQcowState *s = bs->opaque;int64_t start, last, cluster_offset; -uint16_t *refcount_block =NULL ; +void *refcount_block =NULL ;int64_t old_table_index =-1 ;int ret;
@@ -575,7 +595,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,if (table_index != old_table_index) {if (refcount_block) { ret =qcow2_cache_put (bs, s->refcount_block_cache, - (void **) &refcount_block); + &refcount_block);if (ret <0 ) { goto fail; }
@@ -593,7 +613,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,/* we can update the count and save it */ block_index = cluster_index & (s->refcount_block_size -1 ); - refcount =be16_to_cpu (refcount_block[block_index]); + refcount = s->get_refcount (refcount_block, block_index);if (decrease ? (refcount - addend > refcount) : (refcount + addend < refcount || refcount + addend > s->refcount_max))
@@ -609,7 +629,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,if (refcount ==0 && cluster_index < s->free_cluster_index) { s->free_cluster_index = cluster_index; } - refcount_block[block_index] =cpu_to_be16 (refcount); + s->set_refcount (refcount_block, block_index, refcount);if (refcount ==0 && s->discard_passthrough[type]) {update_refcount_discard (bs, cluster_offset, s->cluster_size);
@@ -625,8 +645,7 @@ fail:/* Write last changed block to disk */ if (refcount_block) {int wret; - wret =qcow2_cache_put (bs, s->refcount_block_cache, - (void **) &refcount_block); + wret =qcow2_cache_put (bs, s->refcount_block_cache, &refcount_block);if (wret <0 ) {return ret <0 ? ret : wret; }
@@ -1118,11 +1137,11 @@ static size_t refcount_array_byte_size(BDRVQcowState *s, uint64_t entries)* refcount array buffer will be aligned to a cluster boundary, and the newly * allocated area will be zeroed. */ -static int realloc_refcount_array (BDRVQcowState *s,uint16_t **array, +static int realloc_refcount_array (BDRVQcowState *s,void **array,int64_t *size,int64_t new_size) {size_t old_byte_size, new_byte_size; -uint16_t *new_ptr; +void *new_ptr;/* Round to clusters so the array can be directly written to disk */ old_byte_size =size_to_clusters (s,refcount_array_byte_size (s, *size))
@@ -1162,12 +1181,12 @@ static int realloc_refcount_array(BDRVQcowState *s, uint16_t **array,*/ static int inc_refcounts (BlockDriverState *bs,BdrvCheckResult *res, -uint16_t **refcount_table, +void **refcount_table,int64_t *refcount_table_size,int64_t offset,int64_t size) {BDRVQcowState *s = bs->opaque; -uint64_t start, last, cluster_offset, k; +uint64_t start, last, cluster_offset, k, refcount;int ret;if (size <=0 ) {
@@ -1188,11 +1207,14 @@ static int inc_refcounts(BlockDriverState *bs, } } -if (++(*refcount_table)[k] ==0 ) { + refcount = s->get_refcount (*refcount_table, k); +if (refcount == s->refcount_max) {fprintf (stderr,"ERROR: overflow cluster offset=0x%" PRIx64"\n" , cluster_offset); res->corruptions++; +continue ; } + s->set_refcount (*refcount_table, k, refcount +1 ); }return 0 ;
@@ -1212,8 +1234,9 @@ enum {* error occurred. */ static int check_refcounts_l2 (BlockDriverState *bs,BdrvCheckResult *res, -uint16_t **refcount_table,int64_t *refcount_table_size,int64_t l2_offset, -int flags) +void **refcount_table, +int64_t *refcount_table_size,int64_t l2_offset, +int flags) {BDRVQcowState *s = bs->opaque;uint64_t *l2_table, l2_entry;
@@ -1330,7 +1353,7 @@ fail:*/ static int check_refcounts_l1 (BlockDriverState *bs,BdrvCheckResult *res, -uint16_t **refcount_table, +void **refcount_table,int64_t *refcount_table_size,int64_t l1_table_offset,int l1_size,int flags)
@@ -1529,7 +1552,7 @@ fail:*/ static int check_refblocks (BlockDriverState *bs,BdrvCheckResult *res,BdrvCheckMode fix,bool *rebuild, -uint16_t **refcount_table,int64_t *nb_clusters) +void **refcount_table,int64_t *nb_clusters) {BDRVQcowState *s = bs->opaque;int64_t i, size;
@@ -1614,9 +1637,10 @@ resize_fail:if (ret <0 ) {return ret; } -if ((*refcount_table)[cluster] !=1 ) { +if (s->get_refcount (*refcount_table, cluster) !=1 ) {fprintf (stderr,"ERROR refcount block %" PRId64 -" refcount=%d\n" , i, (*refcount_table)[cluster]); +" refcount=%" PRIu64"\n" , i, + s->get_refcount (*refcount_table, cluster)); res->corruptions++; *rebuild = true; }
@@ -1631,7 +1655,7 @@ resize_fail:*/ static int calculate_refcounts (BlockDriverState *bs,BdrvCheckResult *res,BdrvCheckMode fix,bool *rebuild, -uint16_t **refcount_table,int64_t *nb_clusters) +void **refcount_table,int64_t *nb_clusters) {BDRVQcowState *s = bs->opaque;int64_t i;
@@ -1695,7 +1719,7 @@ static int calculate_refcounts(BlockDriverState *bs, BdrvCheckResult *res,static void compare_refcounts (BlockDriverState *bs,BdrvCheckResult *res,BdrvCheckMode fix,bool *rebuild,int64_t *highest_cluster, -uint16_t *refcount_table,int64_t nb_clusters) +void *refcount_table,int64_t nb_clusters) {BDRVQcowState *s = bs->opaque;int64_t i;
@@ -1711,7 +1735,7 @@ static void compare_refcounts(BlockDriverState *bs, BdrvCheckResult *res,continue ; } - refcount2 = refcount_table[i]; + refcount2 = s->get_refcount (refcount_table, i);if (refcount1 >0 || refcount2 >0 ) { *highest_cluster = i;
@@ -1770,7 +1794,7 @@ static void compare_refcounts(BlockDriverState *bs, BdrvCheckResult *res,*/ static int64_t alloc_clusters_imrt (BlockDriverState *bs,int cluster_count, -uint16_t **refcount_table, +void **refcount_table,int64_t *imrt_nb_clusters,int64_t *first_free_cluster) {
@@ -1787,7 +1811,7 @@ static int64_t alloc_clusters_imrt(BlockDriverState *bs, contiguous_free_clusters < cluster_count; cluster++) { -if (!(*refcount_table)[cluster]) { +if (!s->get_refcount (*refcount_table, cluster)) { contiguous_free_clusters++;if (first_gap) {/* If this is the first free cluster found, update
@@ -1825,7 +1849,7 @@ static int64_t alloc_clusters_imrt(BlockDriverState *bs,/* Go back to the first free cluster */ cluster -= contiguous_free_clusters;for (i =0 ; i < cluster_count; i++) { - (*refcount_table)[cluster + i] =1 ; + s->set_refcount (*refcount_table, cluster + i,1 ); }return cluster << s->cluster_bits;
@@ -1841,7 +1865,7 @@ static int64_t alloc_clusters_imrt(BlockDriverState *bs,*/ static int rebuild_refcount_structure (BlockDriverState *bs,BdrvCheckResult *res, -uint16_t **refcount_table, +void **refcount_table,int64_t *nb_clusters) {BDRVQcowState *s = bs->opaque;
@@ -1849,8 +1873,8 @@ static int rebuild_refcount_structure(BlockDriverState *bs,int64_t refblock_offset, refblock_start, refblock_index;uint32_t reftable_size =0 ;uint64_t *on_disk_reftable =NULL ; -uint16_t *on_disk_refblock; -int i, ret =0 ; +void *on_disk_refblock; +int ret =0 ;struct {uint64_t reftable_offset;uint32_t reftable_clusters;
@@ -1860,7 +1884,7 @@ static int rebuild_refcount_structure(BlockDriverState *bs, write_refblocks:for (; cluster < *nb_clusters; cluster++) { -if (!(*refcount_table)[cluster]) { +if (!s->get_refcount (*refcount_table, cluster)) {continue ; }
@@ -1933,17 +1957,13 @@ write_refblocks: goto fail; } - on_disk_refblock =qemu_blockalign0 (bs->file, s->cluster_size); -for (i =0 ; i < s->refcount_block_size && - refblock_start + i < *nb_clusters; i++) - { - on_disk_refblock[i] = -cpu_to_be16 ((*refcount_table)[refblock_start + i]); - } +/* The size of *refcount_table is always cluster-aligned, therefore the +* write operation will not overflow */ + on_disk_refblock = (void *)((char *) *refcount_table + + refblock_index * s->cluster_size); ret =bdrv_write (bs->file, refblock_offset /BDRV_SECTOR_SIZE , - (void *)on_disk_refblock, s->cluster_sectors); -qemu_vfree (on_disk_refblock); + on_disk_refblock, s->cluster_sectors);if (ret <0 ) {fprintf (stderr,"ERROR writing refblock: %s\n" ,strerror (-ret)); goto fail;
@@ -2038,7 +2058,7 @@ int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res,BDRVQcowState *s = bs->opaque;BdrvCheckResult pre_compare_res;int64_t size, highest_cluster, nb_clusters; -uint16_t *refcount_table =NULL ; +void *refcount_table =NULL ;bool rebuild = false;int ret;
@@ -2087,7 +2107,7 @@ int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res,/* Because the old reftable has been exchanged for a new one the * references have to be recalculated */ rebuild = false; -memset (refcount_table,0 , nb_clusters *sizeof (uint16_t )); +memset (refcount_table,0 ,refcount_array_byte_size (s, nb_clusters)); ret =calculate_refcounts (bs, res,0 , &rebuild, &refcount_table, &nb_clusters);if (ret <0 ) {
block/qcow2.h +8 -0
@@ -213,6 +213,11 @@ typedef struct Qcow2DiscardRegion {QTAILQ_ENTRY (Qcow2DiscardRegion) next; } Qcow2DiscardRegion; +typedef uint64_t Qcow2GetRefcountFunc (const void *refcount_array, +uint64_t index); +typedef void Qcow2SetRefcountFunc (void *refcount_array, +uint64_t index,uint64_t value); + typedef struct BDRVQcowState { int cluster_bits; int cluster_size;
@@ -261,6 +266,9 @@ typedef struct BDRVQcowState {int refcount_bits;uint64_t refcount_max; +Qcow2GetRefcountFunc *get_refcount; +Qcow2SetRefcountFunc *set_refcount; +bool discard_passthrough[QCOW2_DISCARD_MAX ];int overlap_check;/* bitmask of Qcow2MetadataOverlap values */
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 68/73] Add testcase for scsi-hd devices without drive property
In reply to Kevin WolfFrom: Christian Borntraeger <[email protected]>
Lets add a test for scsi devices without a drive. This was broken by a recent block patch, thus indicating that we need a testcase.
--- tests/qemu-iotests/051 | 6 ++++++ tests/qemu-iotests/051.out | 8 ++++++++ 2 files changed, 14 insertions(+)
tests/qemu-iotests/051 +6 -0
@@ -99,6 +99,12 @@ run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2 run_qemu -drive file="$TEST_IMG",driver=qcow2,format=qcow2 echo +echo === Device without drive === +echo + +run_qemu -device virtio-scsi-pci -device scsi-hd + +echo echo === Overriding backing file === echo
tests/qemu-iotests/051.out +8 -0
@@ -47,6 +47,14 @@ Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot specify both 'driver' and 'format' +=== Device without drive === + +Testing: -device virtio-scsi-pci -device scsi-hd +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) QEMU_PROG: -device scsi-hd: drive property not set +QEMU_PROG: -device scsi-hd: Device 'scsi-hd' could not be initialized + + === Overriding backing file === Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig -nodefaults
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 73/73] MAINTAINERS: Add jcody as blockjobs, block devices maintainer
In reply to Kevin WolfFrom: Jeff Cody <[email protected]>
The block layer maintainership is being split up into smaller, more manageable pieces.
I propose that I take over / assist with the following areas:
* blockjobs
* archipelago
* curl
* gluster
* nfs
* rbd
* sheepdog
* ssh
* vhdx
As John Snow noted in a different patch:
As we split out the block layer, we will begin using the qemu-block mailing list as a catchall for all of the block layer subcomponents. Please CC [email protected] for all block layer patches, including any that touch the above listed areas.
--- MAINTAINERS | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
MAINTAINERS +43 -0
@@ -784,6 +784,18 @@ F: tests/qemu-iotests/ T: git git://repo.or.cz/qemu/kevin.git block T: git git://github.com/stefanha/qemu.git block +Block Jobs +M: Jeff Cody <[email protected]> +L: [email protected] +S: Supported +F: blockjob.c +F: include/block/blockjob.h +F: block/backup.c +F: block/commit.c +F: block/stream.h +F: block/mirror.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block + Character Devices M: Anthony Liguori <[email protected]> M: Paolo Bonzini <[email protected]>
@@ -1093,20 +1105,28 @@ F: block/vmdk.c RBD M: Josh Durgin <[email protected]> +M: Jeff Cody <[email protected]> +L: [email protected] S: Supported F: block/rbd.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block Sheepdog M: Hitoshi Mitake <[email protected]> M: Liu Yuan <[email protected]> +M: Jeff Cody <[email protected]> +L: [email protected] L: [email protected] S: Supported F: block/sheepdog.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block VHDX M: Jeff Cody <[email protected]> +L: [email protected] S: Supported F: block/vhdx* +T: git git://github.com/codyprime/qemu-kvm-jtc.git block VDI M: Stefan Weil <[email protected]>
@@ -1121,19 +1141,42 @@ S: Supported F: block/iscsi.c NFS +M: Jeff Cody <[email protected]> M: Peter Lieven <[email protected]> +L: [email protected] S: Maintained F: block/nfs.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block SSH M: Richard W.M. Jones <[email protected]> +M: Jeff Cody <[email protected]> +L: [email protected] S: Supported F: block/ssh.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block ARCHIPELAGO M: Chrysostomos Nanakos <[email protected]> +M: Jeff Cody <[email protected]> +L: [email protected] S: Maintained F: block/archipelago.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block + +CURL +M: Jeff Cody <[email protected]> +L: [email protected] +S: Supported +F: block/curl.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block + +GLUSTER +M: Jeff Cody <[email protected]> +L: [email protected] +S: Supported +F: block/gluster.c +T: git git://github.com/codyprime/qemu-kvm-jtc.git block Bootdevice M: Gonglei <[email protected]>
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 69/73] sheepdog: Fix misleading error messages in sd_snapshot_create()
In reply to Kevin WolfFrom: Markus Armbruster <[email protected]>
If do_sd_create() fails, it first reports the error returned, then reports a another one with strerror(errno). errno is meaningless at that point.
Report just one error combining the valid information from both messages.
--- block/sheepdog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
block/sheepdog.c +2 -3
@@ -2339,9 +2339,8 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) ret =do_sd_create (s, &new_vid,1 , &local_err);if (ret <0 ) { -error_report_err (local_err); -error_report ("failed to create inode for snapshot. %s" , -strerror (errno)); +error_report ("failed to create inode for snapshot: %s" , +error_get_pretty (local_err)); goto cleanup; }
Signature · 1 line
1.8.3.1
Quoted 16 lines · Kevin Wolf
Hi Peter,
I hope this fixes the build problems in Stefan's pull request. I'm only posting those patches that are new compared to Stefan's version, or that have actual differences (the fixed build errors; not reposting for my added Signed-off-by).
Kevin
The following changes since commit
6608c7e9eb65727524f6f590b1e716ec6e7877d4:Merge remote-tracking branch 'remotes/xtensa/tags/20150307-xtensa' into staging (2015-03-08 14:32:38 +0000)
are available in the git repository at:
Quoted 8 lines
git://repo.or.cz/qemu/kevin.gittags/for-upstreamfor you to fetch changes up to
305a8e96908c89a926438e1c4b738b296ee12061:
MAINTAINERS: Add jcody as blockjobs, block devices maintainer (2015-03-09 16:33:44 +0100)----------------------------------------------------------------
Block patches for 2.3
Build failure, OSX:
/Users/pm215/src/qemu/tests/libqos/ahci.c:777:6: error: conflicting types for 'ahci_command_adjust'
void ahci_command_adjust(AHCICommand *cmd, uint64_t offset, uint64_t buffer,
^
/Users/pm215/src/qemu/tests/libqos/ahci.h:548:6: note: previous
declaration is here
void ahci_command_adjust(AHCICommand *cmd, uint64_t lba_sect, uint64_t gbuffer,
^1 error generated.
Build failure, Win32:
/home/petmay01/linaro/qemu-for-merges/hw/block/virtio-blk.c: In function 'virtio_blk_handle_scsi_req':/home/petmay01/linaro/qemu-for-merges/hw/block/virtio-blk.c:200:
warning: unused variable 'acb'
-- PMM
Quoted 6 lines · Peter Maydell
Build failure, Win32:
/home/petmay01/linaro/qemu-for-merges/hw/block/virtio-blk.c: In function 'virtio_blk_handle_scsi_req':/home/petmay01/linaro/qemu-for-merges/hw/block/virtio-blk.c:200:
warning: unused variable 'acb'
The variable definition should be moved into #ifdef. Kevin, could you squash this to "[PULL 09/69] virtio-blk: Check return value of blk_aio_ioctl"?:
hw/block/virtio-blk.c +1 -1
@@ -197,11 +197,11 @@ static int virtio_blk_handle_scsi_req(VirtIOBlockReq *req)VirtIODevice *vdev =VIRTIO_DEVICE (req->dev);VirtQueueElement *elem = &req->elem;VirtIOBlock *blk = req->dev; -BlockAIOCB *acb;#ifdef __linux__int i;VirtIOBlockIoctlReq *ioctl_req; +BlockAIOCB *acb;#endif /*