[Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2

Kevin Wolf posted 10 patches 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180111195225.4226-1-kwolf@redhat.com
Test checkpatch failed
Test docker passed
Test ppc failed
Test s390x passed
qapi/block-core.json       | 107 ++++++++++++
include/block/block.h      |   1 +
include/block/block_int.h  |   2 +
include/qemu/option.h      |   2 +
block.c                    |  87 ++++++++++
block/qcow2.c              | 395 +++++++++++++++++++++++++++++----------------
util/qemu-option.c         |  28 +++-
tests/qemu-iotests/049.out |  10 +-
8 files changed, 486 insertions(+), 146 deletions(-)
[Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2
Posted by Kevin Wolf 6 years, 3 months ago
This series implements a minimal QMP command that allows to create an
image format on a given block node. The interface is still going to
change to some kind of an async command (possibly a block job), so I
prefixed x- for now.

At this point, I'm mostly interested in comments about
BlockdevCreateOptions in the schema, the .bdrv_co_create callback and
the way that legacy .bdrv_create is implemented in qcow2 now.

It looks to me as if we will have to keep .bdrv_create in addition to
the new .bdrv_co_create for a while in all drivers, where the
implementation of .bdrv_create would call .bdrv_co_create like this
series does it for qcow2. We'll only be able to drop the old interface
after deprecating and eventually removing all of the driver-specific
compatibility work that remains. The example of qcow2 shows that the
"translation" from old to new is managable, but there are a few
differences.

Kevin Wolf (10):
  block/qapi: Introduce BlockdevCreateOptions
  block/qapi: Add qcow2 create options to schema
  qcow2: Let qcow2_create() handle protocol layer
  qcow2: Pass BlockdevCreateOptions to qcow2_create2()
  qcow2: Use BlockdevRef in qcow2_create2()
  qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()
  qcow2: Handle full/falloc preallocation in qcow2_create2()
  util: Add qemu_opts_to_qdict_filtered()
  qcow2: Use visitor for options in qcow2_create()
  block: x-blockdev-create QMP command

 qapi/block-core.json       | 107 ++++++++++++
 include/block/block.h      |   1 +
 include/block/block_int.h  |   2 +
 include/qemu/option.h      |   2 +
 block.c                    |  87 ++++++++++
 block/qcow2.c              | 395 +++++++++++++++++++++++++++++----------------
 util/qemu-option.c         |  28 +++-
 tests/qemu-iotests/049.out |  10 +-
 8 files changed, 486 insertions(+), 146 deletions(-)

-- 
2.13.6


Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2
Posted by no-reply@patchew.org 6 years, 3 months ago
Hi,

This series failed build test on ppc host. Please find the details below.

Message-id: 20180111195225.4226-1-kwolf@redhat.com
Subject: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with
# HEAD pointing to a commit that has the patches applied on top of "base"
# branch
set -e
echo "=== ENV ==="
env
echo "=== PACKAGES ==="
rpm -qa
echo "=== TEST BEGIN ==="
INSTALL=$PWD/install
BUILD=$PWD/build
mkdir -p $BUILD $INSTALL
SRC=$PWD
cd $BUILD
$SRC/configure --prefix=$INSTALL
make -j100
# XXX: we need reliable clean up
# make check -j100 V=1
make install
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1515700960-26388-1-git-send-email-thuth@redhat.com -> patchew/1515700960-26388-1-git-send-email-thuth@redhat.com
 - [tag update]      patchew/20180111183714.22834-2-malbarbo@gmail.com -> patchew/20180111183714.22834-2-malbarbo@gmail.com
 * [new tag]         patchew/20180111195225.4226-1-kwolf@redhat.com -> patchew/20180111195225.4226-1-kwolf@redhat.com
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Submodule 'pixman' (git://anongit.freedesktop.org/pixman) registered for path 'pixman'
Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'roms/openhackware'
Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'roms/qemu-palcode'
Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'roms/vgabios'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
fatal: remote error: access denied or repository not exported: /pixman
Cloning into 'pixman'...
Clone of 'git://anongit.freedesktop.org/pixman' into submodule path 'pixman' failed
Traceback (most recent call last):
  File "/home/patchew/patchew/patchew-cli", line 504, in test_one
    git_clone_repo(clone, r["repo"], r["head"], logf)
  File "/home/patchew/patchew/patchew-cli", line 50, in git_clone_repo
    stderr=logf, stdout=logf)
  File "/usr/lib64/python3.4/subprocess.py", line 558, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', '-q', '--recursive', '/home/patchew/.cache/patchew-git-cache/httpsgithubcompatchewprojectqemu-3c8cf5a9c21ff8782164d1def7f44bd888713384', '/var/tmp/patchew-tester-tmp-ksowqfsy/src']' returned non-zero exit status 1



---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2
Posted by Max Reitz 6 years, 2 months ago
On 2018-01-11 20:52, Kevin Wolf wrote:
> This series implements a minimal QMP command that allows to create an
> image format on a given block node. The interface is still going to
> change to some kind of an async command (possibly a block job), so I
> prefixed x- for now.
> 
> At this point, I'm mostly interested in comments about
> BlockdevCreateOptions in the schema, the .bdrv_co_create callback and
> the way that legacy .bdrv_create is implemented in qcow2 now.
> 
> It looks to me as if we will have to keep .bdrv_create in addition to
> the new .bdrv_co_create for a while in all drivers, where the
> implementation of .bdrv_create would call .bdrv_co_create like this
> series does it for qcow2. We'll only be able to drop the old interface
> after deprecating and eventually removing all of the driver-specific
> compatibility work that remains. The example of qcow2 shows that the
> "translation" from old to new is managable, but there are a few
> differences.

Looks good. :-)

Max

Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2
Posted by Kevin Wolf 6 years, 3 months ago
Am 11.01.2018 um 20:52 hat Kevin Wolf geschrieben:
> This series implements a minimal QMP command that allows to create an
> image format on a given block node. The interface is still going to
> change to some kind of an async command (possibly a block job), so I
> prefixed x- for now.
> 
> At this point, I'm mostly interested in comments about
> BlockdevCreateOptions in the schema, the .bdrv_co_create callback and
> the way that legacy .bdrv_create is implemented in qcow2 now.
> 
> It looks to me as if we will have to keep .bdrv_create in addition to
> the new .bdrv_co_create for a while in all drivers, where the
> implementation of .bdrv_create would call .bdrv_co_create like this
> series does it for qcow2. We'll only be able to drop the old interface
> after deprecating and eventually removing all of the driver-specific
> compatibility work that remains. The example of qcow2 shows that the
> "translation" from old to new is managable, but there are a few
> differences.

Peter? Eric? Any opinions so far?

Kevin

Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2
Posted by no-reply@patchew.org 6 years, 3 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180111195225.4226-1-kwolf@redhat.com
Subject: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
54f470b74b block: x-blockdev-create QMP command
1aab7a7129 qcow2: Use visitor for options in qcow2_create()
a669aa74c7 util: Add qemu_opts_to_qdict_filtered()
9397f3fd59 qcow2: Handle full/falloc preallocation in qcow2_create2()
f54ee96af1 qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()
b0955f8fa3 qcow2: Use BlockdevRef in qcow2_create2()
583499d48c qcow2: Pass BlockdevCreateOptions to qcow2_create2()
6c4762a900 qcow2: Let qcow2_create() handle protocol layer
715887c079 block/qapi: Add qcow2 create options to schema
84a5b6de96 block/qapi: Introduce BlockdevCreateOptions

=== OUTPUT BEGIN ===
Checking PATCH 1/10: block/qapi: Introduce BlockdevCreateOptions...
Checking PATCH 2/10: block/qapi: Add qcow2 create options to schema...
Checking PATCH 3/10: qcow2: Let qcow2_create() handle protocol layer...
Checking PATCH 4/10: qcow2: Pass BlockdevCreateOptions to qcow2_create2()...
ERROR: space prohibited after that '&' (ctx:WxW)
#283: FILE: block/qcow2.c:3061:
+        .node           = & (BlockdevRef) {
                           ^

total: 1 errors, 0 warnings, 282 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 5/10: qcow2: Use BlockdevRef in qcow2_create2()...
Checking PATCH 6/10: qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()...
Checking PATCH 7/10: qcow2: Handle full/falloc preallocation in qcow2_create2()...
Checking PATCH 8/10: util: Add qemu_opts_to_qdict_filtered()...
Checking PATCH 9/10: qcow2: Use visitor for options in qcow2_create()...
ERROR: trailing whitespace
#301: FILE: tests/qemu-iotests/049.out:109:
+qemu-img: Invalid image size specified! You may use k, M, G, T, P or E suffixes for $

ERROR: trailing whitespace
#310: FILE: tests/qemu-iotests/049.out:119:
+qemu-img: Invalid image size specified! You may use k, M, G, T, P or E suffixes for $

total: 2 errors, 0 warnings, 313 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 10/10: block: x-blockdev-create QMP command...
ERROR: "foo* bar" should be "foo *bar"
#42: FILE: block.c:504:
+    BlockDriver* drv = bdrv_find_format(fmt);

total: 1 errors, 0 warnings, 89 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org