On 2020-10-09 15:56, Max Reitz wrote:
On 09.10.20 14:55, Jakob Bohm wrote:
On 2020-10-09 10:48, Max Reitz wrote:
[...]
The error I got was specifically "Failed to lock byte 100" and VM not
starting. The ISO file was on a R/W NFS3 share, but was itself R/O for
the user that root was mapped t
Since 'nbd-server-add' is deprecated, and 'block-export-add' is new to
5.2, we can still tweak the interface. Allowing 'bitmaps':['str'] is
nicer than 'bitmap':'str'. This wires up the qapi and qemu-nbd
changes to permit passing multiple bitmaps as distinct metadata
contexts that the NBD client m
Rather than open-code the count of negotiated contexts at several
sites, embed it directly into the struct.
Signed-off-by: Eric Blake
---
nbd/server.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/nbd/server.c b/nbd/server.c
index 05a8154975a1..27d
Each dirty bitmap already knows its name; by reducing the scope of the
places where we construct "qemu:dirty-bitmap:NAME" strings, tracking
the name is more localized, and there are fewer per-export fields to
worry about. This in turn will make it easier for an upcoming patch
to export more than o
With this, 'qemu-nbd -B b0 -B b1 -f qcow2 img.qcow2' can let you sniff
out multiple bitmaps from one server. qemu-img as client can still
only read one bitmap per client connection, but other NBD clients
(hello libnbd) can now read multiple bitmaps in a single pass.
Signed-off-by: Eric Blake
---
'qemu-img map' provides a way to determine which extents of an image
come from the top layer vs. inherited from a backing chain. This is
useful information worth exposing over NBD. There is a proposal to
add a QMP command block-dirty-bitmap-populate which can create a dirty
bitmap that reflects a
Allow the server to expose an additional metacontext to be requested
by savvy clients. qemu-nbd adds a new option -A to expose the
qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this
can also be set via QMP when using block-export-add.
qemu as client can be hacked into viewing th
Rather than open-coding the translation from the deprecated
NbdServerAddOptions type to the preferred BlockExportOptionsNbd, it's
better to utilize QAPI_CLONE_MEMBERS. This solves a couple of issues:
first, if we do any more refactoring of the base type (which an
upcoming patch plans to do), we do
v3 was here:
https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02305.html
Since then:
rebase to master
- patch 1 is new, fixing a theoretical bug in QAPI interaction and
simplifying later patches
- patch 2, 4, and 6 are renamed to favor the term 'metadata context'
[Markus], sadly 'git bac
Honoring just SIGTERM on Linux is too weak; we also want to handle
other common signals, and do so even on BSD. Why? Because at least
'qemu-nbd -B bitmap' needs a chance to clean up the in-use bit on
bitmaps when the server is shut down via a signal.
See also: http://bugzilla.redhat.com/1883608
On 10/9/20 2:09 PM, Elena Afanasova wrote:
> Spotted by PVS-Studio
>
> Signed-off-by: Elena Afanasova
> ---
> block/blkdebug.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Eric Blake
>
> diff --git a/block/blkdebug.c b/block/blkdebug.c
> index eecbf3e5c4..54da719dd1 100644
> --- a/bl
Patchew URL:
https://patchew.org/QEMU/20201009193529.322822-1-stefa...@redhat.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20201009193529.322822-1-stefa...@redhat.com
Subject: [PULL 00/30] Block patches
=== TES
Signed-off-by: Stefan Hajnoczi
Message-id: 20201001144604.559733-3-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
tests/qtest/vhost-user-blk-test.c | 81 +--
1 file changed, 76 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/vhost-user-blk-test.c
b/te
From: Vladimir Sementsov-Ogievskiy
We are going to reuse bdrv_common_block_status_above in
bdrv_is_allocated_above. bdrv_is_allocated_above may be called with
include_base == false and still bs == base (for ex. from img_rebase()).
So, support this corner case.
Signed-off-by: Vladimir Sementsov-
Make it possible to specify the iothread where the export will run. By
default the block node can be moved to other AioContexts later and the
export will follow. The fixed-iothread option forces strict behavior
that prevents changing AioContext while the export is active. See the
QAPI docs for deta
Introduce libblkdev.fa to avoid recompiling blockdev_ss twice.
Suggested-by: Paolo Bonzini
Reviewed-by: Paolo Bonzini
Signed-off-by: Stefan Hajnoczi
Message-id: 20200929125516.186715-3-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
meson.build| 12 ++--
storage
Headers used by other subsystems are located in include/. Also add the
vhost-user-server and vhost-user-blk-server headers to MAINTAINERS.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-13-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
MAINTAINERS
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build
the static library once and then reuse it throughout QEMU.
Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the
vhost-user tools (vhost-user-gpu, etc) do.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924
From: Vladimir Sementsov-Ogievskiy
bdrv_is_allocated_above wrongly handles short backing files: it reports
after-EOF space as UNALLOCATED which is wrong, as on read the data is
generated on the level of short backing file (if all overlays have
unallocated areas at that place).
Reusing bdrv_commo
The device panic notifier callback is not used. Drop it.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-7-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
util/vhost-user-server.h | 3 ---
block/export/vhost-user-blk-server.c | 3 +--
util/vhost-user-server.c
From: Vladimir Sementsov-Ogievskiy
These cases are fixed by previous patches around block_status and
is_allocated.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Message-id: 20200924194003.22080-6-vsement...@virtuozzo.com
Signed-off-by: Stefan
From: Vladimir Sementsov-Ogievskiy
In order to reuse bdrv_common_block_status_above in
bdrv_is_allocated_above, let's support include_base parameter.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Alberto Garcia
Reviewed-by: Eric Blake
Message-id: 20200924194003.22080-3-vsement...@v
From: Vladimir Sementsov-Ogievskiy
bdrv_co_block_status_above has several design problems with handling
short backing files:
1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but
without BDRV_BLOCK_ALLOCATED flag, when actually short backing file
which produces these after-EOF zero
We already have access to the value with the correct type (ioc and sioc
are the same QIOChannel).
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-4-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
util/vhost-user-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Block exports are used by softmmu, qemu-storage-daemon, and qemu-nbd.
They are not used by other programs and are not otherwise needed in
libblock.
Undo the recent move of blockdev-nbd.c from blockdev_ss into block_ss.
Since bdrv_close_all() (libblock) calls blk_exp_close_all()
(libblockdev) a stu
Allow the number of queues to be configured using --export
vhost-user-blk,num-queues=N. This setting should match the QEMU --device
vhost-user-blk-pci,num-queues=N setting but QEMU vhost-user-blk.c lowers
its own value if the vhost-user-blk backend offers fewer queues than
QEMU.
The vhost-user-blk
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-3-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
util/vhost-user-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c
index 7b50a2b1fd..2cd0cf8277
Use the new QAPI block exports API instead of defining our own QOM
objects.
This is a large change because the lifecycle of VuBlockDev needs to
follow BlockExportDriver. QOM properties are replaced by QAPI options
objects.
VuBlockDev is renamed VuBlkExport and contains a BlockExport field.
Severa
The vu_client_trip() coroutine is leaked during AioContext switching. It
is also unsafe to destroy the vu_dev in panic_cb() since its callers
still access it in some cases.
Rework the lifecycle to solve these safety issues.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-10-stef
Unexpected EOF is an error that must be reported.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-9-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
util/vhost-user-server.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/util/vhost-user-server.c
From: Coiby Xu
Suggested-by: Stefano Garzarella
Signed-off-by: Coiby Xu
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Marc-André Lureau
Message-id: 20200918080912.321299-8-coiby...@gmail.com
Signed-off-by: Stefan Hajnoczi
---
MAINTAINERS | 8
1 file changed, 8 insertions(+)
diff --git
Propagate the flush return value since errors are possible.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-11-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
block/export/vhost-user-blk-server.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --g
From: Coiby Xu
Move the constants from hw/core/qdev-properties.c to
util/block-helpers.h so that knowledge of the min/max values is
Signed-off-by: Stefan Hajnoczi
Signed-off-by: Coiby Xu
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Marc-André Lureau
Acked-by: Eduardo Habkost
Message-id: 202009
fds[] is leaked when qio_channel_readv_full() fails.
Use vmsg->fds[] instead of keeping a local fds[] array. Then we can
reuse goto fail to clean up fds. vmsg->fd_num must be zeroed before the
loop to make this safe.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-8-stefa...@red
From: Coiby Xu
This test case has the same tests as tests/virtio-blk-test.c except for
tests have block_resize. Since vhost-user server can only server one
client one time, two instances of vhost-user-blk-server are started by
qemu-storage-daemon for the hotplug test.
In order to not block scrip
Explicitly deleting watches is not necessary since libvhost-user calls
remove_watch() during vu_deinit(). Add an assertion to check this
though.
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-5-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
util/vhost-user-server.c | 1
From: Coiby Xu
By making use of libvhost-user, block device drive can be shared to
the connected vhost-user client. Only one client can connect to the
server one time.
Since vhost-user-server needs a block drive to be created first, delay
the creation of this object.
Suggested-by: Kevin Wolf
S
Only one struct is needed per request. Drop req_data and the separate
VuBlockReq instance. Instead let vu_queue_pop() allocate everything at
once.
This fixes the req_data memory leak in vu_block_virtio_process_req().
Signed-off-by: Stefan Hajnoczi
Message-id: 20200924151549.913737-6-stefa...@red
From: Coiby Xu
When the client is running in gdb and quit command is run in gdb,
QEMU will still dispatch the event which will cause segment fault in
the callback function.
Signed-off-by: Coiby Xu
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Marc-André Lureau
Message-id: 20200918080912.321299-3-
From: Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the
QIOChannel functions. Thus reading vhost-user message won't stall the
guest. For slave channel, we still use the default vu_message_read.
Reviewed-by: Marc-André Lureau
Signed-off-by: Coiby Xu
Reviewed-by: St
From: Coiby Xu
Sharing QEMU devices via vhost-user protocol.
Only one vhost-user client can connect to the server one time.
Suggested-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Signed-off-by: Coiby Xu
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Marc-André Lureau
Message-id: 20200918080912
From: Philippe Mathieu-Daudé
Keep statistics of some hardware errors, and number of
aligned/unaligned I/O accesses.
QMP example booting a full RHEL 8.3 aarch64 guest:
{ "execute": "query-blockstats" }
{
"return": [
{
"device": "",
"node-name": "drive0",
The following changes since commit 497d415d76b9f59fcae27f22df1ca2c3fa4df64e:
Merge remote-tracking branch
'remotes/pmaydell/tags/pull-target-arm-20201008-1' into staging (2020-10-08
21:41:20 +0100)
are available in the Git repository at:
https://gitlab.com/stefanha/qemu.git tags/block-pull
Spotted by PVS-Studio
Signed-off-by: Elena Afanasova
---
block/blkdebug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index eecbf3e5c4..54da719dd1 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -215,6 +215,7 @@ static int add_rule(void *opaque
A recent change to weak reset handling broke replay due to the use of
aio_bh_schedule_oneshot instead of the replay aware
replay_bh_schedule_oneshot_event.
Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
Suggested-by: Pavel Dovgalyuk
Signed-off-by: Alex Bennée
Reviewed-by: Philippe M
Kevin Wolf writes:
> This adds a special meaning for 'help' and '?' as options to the keyval
> parser. Instead of being an error (because of a missing value) or a
> value for an implied key, they now request help, which is a new boolean
> ouput of the parser in addition to the QDict.
>
> A new pa
PASS 7 test-coroutine /basic/in_coroutine
7043PASS 8 test-coroutine /basic/order
7044PASS 9 test-coroutine /locking/co-mutex
7045PASS 10 test-coroutine /locking/co-mutex/lockable
7046MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
G_TEST_SRCDIR=D:/a/qemu/qemu/tests
G_TEST_BUILDDIR=
Eric Blake writes:
> On 9/29/20 12:26 PM, Kevin Wolf wrote:
>> This adds a new parameter 'help' to keyval_parse() that enables parsing
>> of help options. If NULL is passed, the function behaves the same as
>> before. But if a bool pointer is given, it contains the information
>> whether an optio
On 10/8/20 7:48 PM, Philippe Mathieu-Daudé wrote:
Just for consistency, following the example documented since
commit e3fe3988d7 ("error: Document Error API usage rules").
I meant to use this description:
Just for consistency, following the example documented since
commit e3fe3988d7 ("erro
On 09.10.20 14:55, Jakob Bohm wrote:
> On 2020-10-09 10:48, Max Reitz wrote:
[...]
> The error I got was specifically "Failed to lock byte 100" and VM not
> starting. The ISO file was on a R/W NFS3 share, but was itself R/O for
> the user that root was mapped to by linux-nfs-server via /etc/expo
Honoring just SIGTERM on Linux is too weak; we also want to handle
other common signals, and do so even on BSD. Why? Because at least
'qemu-nbd -B bitmap' needs a chance to clean up the in-use bit on
bitmaps when the server is shut down via a signal.
See also: http://bugzilla.redhat.com/1883608
On 08.10.2020 20:48, Philippe Mathieu-Daudé wrote:
Just for consistency, following the example documented since
commit e3fe3988d7 ("error: Document Error API usage rules").
Document the function.
Signed-off-by: Philippe Mathieu-Daudé
Acked-by: Pavel Dovgalyuk
---
include/migration/snapsh
On 08.10.2020 14:50, Kevin Wolf wrote:
Am 08.10.2020 um 12:26 hat Philippe Mathieu-Daudé geschrieben:
On 10/7/20 3:11 PM, Pavel Dovgalyuk wrote:
On 07.10.2020 15:49, Philippe Mathieu-Daudé wrote:
On 10/7/20 2:20 PM, Pavel Dovgalyuk wrote:
On 07.10.2020 14:22, Alex Bennée wrote:
Philippe
On 08.10.2020 20:48, Philippe Mathieu-Daudé wrote:
From: Daniel P. Berrangé
None of the callers care about the errno value since there is a full
Error object populated. This gives consistency with save_snapshot()
which already just returns a boolean value.
Reviewed-by: Dr. David Alan Gilbert
On 07.10.2020 22:28, Vladimir Sementsov-Ogievskiy wrote:
07.10.2020 22:01, Andrey Shinkevich wrote:
On 07.10.2020 13:06, Vladimir Sementsov-Ogievskiy wrote:
29.09.2020 15:38, Andrey Shinkevich wrote:
If the flag BDRV_REQ_PREFETCH was set, pass it further to the
COR-driver to skip unneeded rea
On 2020-10-09 10:48, Max Reitz wrote:
On 08.10.20 18:49, Jakob Bohm wrote:
(Top posting because previous reply did so):
If the bug was closed as "can't reproduce", why was a very similar bug
listed as fixed in RHSA-2019:2553-01 ?
Hi,
Which very similar bug do you mean? I can only guess that
On 09/10/20 11:48, Kevin Wolf wrote:
> Am 07.10.2020 um 13:56 hat Paolo Bonzini geschrieben:
>> Test 067 from qemu-iotests is executing QMP commands to hotplug
>> and hot-unplug disks, devices and blockdevs. Because the power
>> of the text-based test harness is limited, it is actually limiting
>>
On 10/9/20 4:03 AM, Richard W.M. Jones wrote:
>>> +++ b/qapi/block-core.json
>>> @@ -3882,9 +3882,12 @@
>>> #
>>> # @tls-creds: TLS credentials ID
>>> #
>>> -# @x-dirty-bitmap: A "qemu:dirty-bitmap:NAME" string to query in place of
>>> +# @x-dirty-bitmap: A metacontext name such as "qemu:dirty-
On Thu, Oct 01, 2020 at 03:46:02PM +0100, Stefan Hajnoczi wrote:
> The vhost-user-blk server currently only supports 1 virtqueue. Add a
> 'num-queues' option for multi-queue. Both --device
> vhost-user-blk-pci,num-queues= and --export vhost-user-blk,num-queues= need to
> be set in order for multi-q
On Thu, Sep 24, 2020 at 04:15:36PM +0100, Stefan Hajnoczi wrote:
> v2:
> * Replace unix-socket=str with addr=SocketAddress for consistency with NBD
> and
>fd passing support. The new syntax is:
>--export
> vhost-user-blk,addr.type=unix,addr.path=/tmp/vhost-user-blk.sock,...
> * Make add
On Tue, Sep 29, 2020 at 01:55:12PM +0100, Stefan Hajnoczi wrote:
> v2:
> * Add fixed-iothread option to set AioContext change policy [Kevin]
> * Use os-posix.c signal handling utilities in qemu-nbd.c [Paolo]
>
> This series adjusts the build system and then adds a
> BlockExportOptions->iothread
On Thu, Sep 24, 2020 at 10:39:58PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
>
> These series are here to address the following problem:
> block-status-above functions may consider space after EOF of
> intermediate backing files as unallocated, which is wrong, as these
> backing files a
Am 07.10.2020 um 13:56 hat Paolo Bonzini geschrieben:
> Test 067 from qemu-iotests is executing QMP commands to hotplug
> and hot-unplug disks, devices and blockdevs. Because the power
> of the text-based test harness is limited, it is actually limiting
> the checks that it does, for example by sk
Am 07.10.2020 um 13:56 hat Paolo Bonzini geschrieben:
> Do not just trust the HMP commands to create and delete the drive, use
> query-block to check that this is actually the case.
>
> Signed-off-by: Paolo Bonzini
Reviewed-by: Kevin Wolf
On Fri, Oct 09, 2020 at 10:10:18AM +0200, Markus Armbruster wrote:
> Eric Blake writes:
>
> > Allow the server to expose an additional metacontext to be requested
> > by savvy clients. qemu-nbd adds a new option -A to expose the
> > qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS;
On 08.10.20 18:49, Jakob Bohm wrote:
> (Top posting because previous reply did so):
>
> If the bug was closed as "can't reproduce", why was a very similar bug
> listed as fixed in RHSA-2019:2553-01 ?
Hi,
Which very similar bug do you mean? I can only guess that perhaps you
mean 1603104 or 15514
Eric Blake writes:
> Allow the server to expose an additional metacontext to be requested
> by savvy clients. qemu-nbd adds a new option -A to expose the
> qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this
> can also be set via QMP when using block-export-add.
>
> qemu as clie
67 matches
Mail list logo