On 7/12/22 15:17, Hannes Reinecke wrote:
> On 7/12/22 04:13, Sam Li wrote:
>> Signed-off-by: Sam Li
>> ---
>> block/file-posix.c | 60
>> include/block/block-common.h | 4 +--
>> 2 files changed, 62 insertions(+), 2 deletions(-)
>>
>> diff --git
On 7/5/22 21:07, Vladimir Sementsov-Ogievskiy wrote:
strerror() represents ETIMEDOUT a bit different in Linux and macOS /
FreeBSD. Let's support the latter too.
Fixes: 9d05a87b77 ("iotests: copy-before-write: add cases for cbw-timeout
option")
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
A
On 7/6/22 22:38, Vladimir Sementsov-Ogievskiy wrote:
Declare that we need copy-before-write filter to avoid failure when
filter is not whitelisted.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/tests/copy-before-write | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(
On 7/12/22 11:13, Sam Li wrote:
> Add zoned storage commands of the device: zone_open(zo), zone_close(zc),
> zone_reset(zs), zone_report(zp), zone_finish(zf).
>
> For example, it can be called by:
> ./build/qemu-io --image-opts driver=zoned_host_device, filename=/dev/nullb0
> -c "zone_report 0 0 1
On 7/12/22 11:13, Sam Li wrote:
> By adding zone management operations in BlockDriver, storage
> controller emulation can use the new block layer APIs including
> zone_report and zone_mgmt(open, close, finish, reset).
>
> Signed-off-by: Sam Li
> ---
> block/block-backend.c| 41 +
On 7/12/22 11:13, Sam Li wrote:
> Use sysfs attribute files to get the zoned device information in case
> that ioctl() commands of zone management interface won't work.
>
> Signed-off-by: Sam Li
> ---
> block/file-posix.c | 38 +++---
> 1 file changed, 27 insertio
On 7/12/22 11:13, Sam Li wrote:
> Signed-off-by: Sam Li
> ---
> block/file-posix.c | 60
> include/block/block-common.h | 4 +--
> 2 files changed, 62 insertions(+), 2 deletions(-)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 31
On 7/12/22 11:13, Sam Li wrote:
> ---
> block/file-posix.c | 8 +++-
> qapi/block-core.json | 7 +--
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index e9ad1d8e1e..4e0aa02acf 100644
> --- a/block/file-posix.c
> +++ b/bloc
On Wed, Jun 15, 2022 at 04:51:17PM +0100, Stefan Hajnoczi wrote:
> From: Jagannathan Raman
>
> add the libvfio-user library as a submodule. build it as a meson
> subproject.
>
> libvfio-user is distributed with BSD 3-Clause license and
> json-c with MIT (Expat) license
>
> Signed-off-by: Elena
Hi
On Thu, Jul 7, 2022 at 10:05 PM Marc-André Lureau <
marcandre.lur...@gmail.com> wrote:
> Hi
>
> On Thu, Jul 7, 2022 at 4:18 PM Markus Armbruster
> wrote:
>
>> marcandre.lur...@redhat.com writes:
>>
>> > From: Marc-André Lureau
>> >
>> > error_vprintf() is implemented in monitor.c, which over
From: Marc-André Lureau
Missed in commit beeb175c0d "util/qemu-error: Rename error_print_loc()
to be more generic".
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
util/error-report.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/error-report.c b
From: Marc-André Lureau
Pass the program name as "prefix" argument to print_loc() if printing
with "details". This allows to get rid of monitor_cur() call in
print_loc().
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
util/error-report.c | 8
1 file changed, 4 in
From: Marc-André Lureau
Let's use a more explicit variable "detailed" instead of calling
monitor_cur() multiple times.
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
util/error-report.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/error-re
From: Marc-André Lureau
Hi,
Here is another subset of the large "subproject(qga)"" series I intend to send
soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga).
Thanks
v2:
- drop error_init() callbacks, use static library symbol override instead
- include a few patches from th
From: Marc-André Lureau
Replace hard-coded "qemu/osdep.h" include with a qapi-gen option to
specify the headers to include. This will allow to substitute QEMU
osdep.h with glib.h for example, for projects with different
global headers.
For historical reasons, we can keep the default as "qemu/osd
From: Marc-André Lureau
qemu-common will have compatible dependency requirements with QEMU.
Since qemu-common won't have a toplevel qemu/osdep.h which would include
various system headers, include stdbool.h (bool is used for some
declarations here).
Replace getenv() with g_getenv() to avoid ext
From: Marc-André Lureau
Remove the direct dependency from error-report to monitor code.
This will allow to move error-report to a subproject.
Signed-off-by: Marc-André Lureau
---
include/qemu/error-report.h | 2 ++
softmmu/vl.c| 5 +
stubs/error-is-detailed.c | 7 +++
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
stubs/error-printf.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/stubs/error-printf.c b/stubs/error-printf.c
index 0e326d801059..1afa0f62ca26 100644
--- a/stubs/error-printf.c
+++ b/stubs/error-printf.c
@@ -16,8 +16,3 @@ i
From: Marc-André Lureau
Make QMP-dispatch code free from QEMU-specific OOB dispatch/async
coroutine handling. This will allow to move the base code to
qemu-common, and clear other users from potential mis-ususe (QGA doesn't
have OOB or coroutine).
To do that, introduce an optional callback QmpDi
From: Marc-André Lureau
The generated visitor code includes abort() & assert(), we shouldn't
rely on the global "-i" headers to include the necessary system headers.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/visit.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/qapi/vi
From: Marc-André Lureau
Break a cyclic dependency between int128 and host-utils.
Signed-off-by: Marc-André Lureau
---
include/qemu/host-utils.h | 3 -
include/qemu/int128.h | 3 +
util/host-utils.c | 180 --
util/int128.c | 180 ++
From: Marc-André Lureau
Add a new meson subproject to provide common code and scripts for QEMU
and tools. Initially, it will offer QAPI/QMP code generation and
common utilities.
libvhost-user & libvduse will make use of the subproject to avoid having
include/ links to common headers.
The other
From: Marc-André Lureau
This is just moving qapi-gen.py and related subdir to qemu-common, to
ease review and proceed step by step. The following patches will move
related necessary code, tests etc.
Signed-off-by: Marc-André Lureau
---
docs/conf.py | 2 +-
mes
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
.../qemu-common/include}/qemu/error-report.h | 2 ++
.../qemu-common/src}/error-is-detailed.c | 1 -
.../qemu-common/src}/error-report.c | 4 +++-
.../qemu-common/src/error-vprintf.c | 5 ++---
stubs/meso
From: Marc-André Lureau
A subproject test may be simply in the "PROJECT" suite (such as
"qemu-common" with the following patches)
Signed-off-by: Marc-André Lureau
---
scripts/mtest2make.py | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/mtest2make.py b/script
From: Marc-André Lureau
Add new tests to check the behaviour of error reporting functions.
Signed-off-by: Marc-André Lureau
---
.../qemu-common/tests/test-error-report.c | 120 ++
subprojects/qemu-common/meson.build | 2 +
subprojects/qemu-common/tests/meson.bui
Ping
On 09.06.22 14:26, Hanna Reitz wrote:
Hi,
QEMU (the system emulator) and the storage daemon (QSD) write their PID
to the given file when you specify --pidfile. They keep the path around
and register exit handlers (QEMU uses an exit notifier, QSD an atexit()
function) to unlink this file w
On Thu, Jul 07, 2022 at 01:36:21PM +, Darren Kenny wrote:
> Using the Parfait source code analyser and issue was found in
> hw/nvme/ctrl.c where the macros NVME_CAP_SET_CMBS and NVME_CAP_SET_PMRS
> are called with a ternary operatore in the second parameter, resulting
> in a potentially unexpec
On Thu, Jun 09, 2022 at 02:27:00PM +0200, Hanna Reitz wrote:
> Currently, the exit notifier for unlinking the PID file is registered
> unconditionally. Limit it to only when we actually do create a PID
> file.
>
> Signed-off-by: Hanna Reitz
> ---
> softmmu/vl.c | 18 +-
> 1 file
On Thu, Jun 09, 2022 at 02:26:59PM +0200, Hanna Reitz wrote:
> After writing the PID file, we register an atexit() handler to unlink it
> when the process terminates. However, if the process has changed its
> working directory in the meantime (e.g. in os_setup_post() when
> daemonizing), this will
On Fri, Jul 08, 2022 at 11:07:06AM +0200, Emanuele Giuseppe Esposito wrote:
>
>
> Am 05/07/2022 um 16:23 schrieb Stefan Hajnoczi:
> > On Thu, Jun 09, 2022 at 10:37:22AM -0400, Emanuele Giuseppe Esposito wrote:
> >> diff --git a/hw/block/dataplane/virtio-blk.c
> >> b/hw/block/dataplane/virtio-blk
On Jul 12 13:11, Stefan Hajnoczi wrote:
> On Thu, Jul 07, 2022 at 01:36:21PM +, Darren Kenny wrote:
> > Using the Parfait source code analyser and issue was found in
> > hw/nvme/ctrl.c where the macros NVME_CAP_SET_CMBS and NVME_CAP_SET_PMRS
> > are called with a ternary operatore in the second
On Thu, Jun 09, 2022 at 02:27:01PM +0200, Hanna Reitz wrote:
> After writing the PID file, we register an exit notifier to unlink it
> when the process terminates. However, if the process has changed its
> working directory in the meantime (e.g. in os_setup_post() when
> daemonizing), this will no
On Fri, Jul 08, 2022 at 11:19:43AM +0200, Emanuele Giuseppe Esposito wrote:
>
>
> Am 05/07/2022 um 16:39 schrieb Stefan Hajnoczi:
> > On Thu, Jun 09, 2022 at 10:37:25AM -0400, Emanuele Giuseppe Esposito wrote:
> >> Just as done in the block API, mark functions in virtio-blk
> >> that are called a
On Fri, Jul 08, 2022 at 11:33:28AM +0200, Emanuele Giuseppe Esposito wrote:
>
>
> Am 05/07/2022 um 16:45 schrieb Stefan Hajnoczi:
> > On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote:
> >> @@ -946,17 +955,20 @@ static void virtio_blk_reset(VirtIODevice *vdev)
> >>
On Fri, Jul 08, 2022 at 01:22:58PM +0200, Emanuele Giuseppe Esposito wrote:
>
>
> Am 08/07/2022 um 11:33 schrieb Emanuele Giuseppe Esposito:
> >
> >
> > Am 05/07/2022 um 16:45 schrieb Stefan Hajnoczi:
> >> On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote:
> >>> @@ -946
On 09.06.22 14:26, Hanna Reitz wrote:
Hi,
QEMU (the system emulator) and the storage daemon (QSD) write their PID
to the given file when you specify --pidfile. They keep the path around
and register exit handlers (QEMU uses an exit notifier, QSD an atexit()
function) to unlink this file when th
On Fri, Jul 08, 2022 at 11:01:37AM +0200, Emanuele Giuseppe Esposito wrote:
>
>
> Am 05/07/2022 um 16:11 schrieb Stefan Hajnoczi:
> > On Thu, Jun 09, 2022 at 10:37:20AM -0400, Emanuele Giuseppe Esposito wrote:
> >> @@ -146,7 +147,6 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev)
> >>
> >
On Fri, Jul 08, 2022 at 05:17:30AM +0100, Stefan Hajnoczi wrote:
libblkio (https://gitlab.com/libblkio/libblkio/) is a library for
high-performance disk I/O. It currently supports io_uring and
virtio-blk-vhost-vdpa with additional drivers under development.
One of the reasons for developing libb
On Fri, Jul 08, 2022 at 05:17:36AM +0100, Stefan Hajnoczi wrote:
Avoid bounce buffers when QEMUIOVector elements are within previously
registered bdrv_register_buf() buffers.
The idea is that emulated storage controllers will register guest RAM
using bdrv_register_buf() and set the BDRV_REQ_REGI
Queued, thanks (I was on vacation last week).
I am a bit scared about the mode_select_truncated quirk. My reading
of the code is that the MODE SELECT would fail anyway because the
page length does not match in scsi_disk_check_mode_select:
len = mode_sense_page(s, page, &p, 0);
if (len <
On Tue, Jul 12, 2022 at 3:36 AM wrote:
> From: Marc-André Lureau
>
> Add a new meson subproject to provide common code and scripts for QEMU
> and tools. Initially, it will offer QAPI/QMP code generation and
> common utilities.
>
> libvhost-user & libvduse will make use of the subproject to avoid
On Tue, Jul 12, 2022 at 3:37 AM wrote:
> From: Marc-André Lureau
>
> qemu-common will have compatible dependency requirements with QEMU.
>
> Since qemu-common won't have a toplevel qemu/osdep.h which would include
> various system headers, include stdbool.h (bool is used for some
> declarations
On Tue, Jul 12, 2022 at 3:36 AM wrote:
> From: Marc-André Lureau
>
> Remove the direct dependency from error-report to monitor code.
> This will allow to move error-report to a subproject.
>
> Signed-off-by: Marc-André Lureau
> ---
> include/qemu/error-report.h | 2 ++
> softmmu/vl.c
On Tue, Jul 12, 2022 at 3:36 AM wrote:
> From: Marc-André Lureau
>
> The generated visitor code includes abort() & assert(), we shouldn't
> rely on the global "-i" headers to include the necessary system headers.
>
> Signed-off-by: Marc-André Lureau
> ---
> scripts/qapi/visit.py | 2 ++
> 1 fi
On Jul 12, 2022, at 4:39 AM, Daniel P. Berrangé
mailto:berra...@redhat.com>> wrote:
On Wed, Jun 15, 2022 at 04:51:17PM +0100, Stefan Hajnoczi wrote:
From: Jagannathan Raman mailto:jag.ra...@oracle.com>>
add the libvfio-user library as a submodule. build it as a meson
subproject.
libvfio-user
On Tue, Jul 12, 2022 at 03:27:09PM +, Jag Raman wrote:
>
>
> On Jul 12, 2022, at 4:39 AM, Daniel P. Berrangé
> mailto:berra...@redhat.com>> wrote:
>
> On Wed, Jun 15, 2022 at 04:51:17PM +0100, Stefan Hajnoczi wrote:
> From: Jagannathan Raman mailto:jag.ra...@oracle.com>>
>
> add the libvfi
On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote:
> By adding zone management operations in BlockDriver, storage
> controller emulation can use the new block layer APIs including
> zone_report and zone_mgmt(open, close, finish, reset).
>
> Signed-off-by: Sam Li
> ---
> block/block-backend.
> On Jul 12, 2022, at 11:44 AM, Daniel P. Berrangé wrote:
>
> On Tue, Jul 12, 2022 at 03:27:09PM +, Jag Raman wrote:
>>
>>
>> On Jul 12, 2022, at 4:39 AM, Daniel P. Berrangé
>> mailto:berra...@redhat.com>> wrote:
>>
>> On Wed, Jun 15, 2022 at 04:51:17PM +0100, Stefan Hajnoczi wrote:
>>
The following changes since commit 9548cbed4253e38570d29b8cff0bf77c998f:
iotests/copy-before-write: specify required_fmts (2022-07-12 13:21:02 +0530)
are available in the Git repository at:
https://gitlab.com/hreitz/qemu.git tags/pull-block-2022-07-12
for you to fetch changes up to 85c4
From: Alberto Faria
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes; @@
- bdrv_pread(child, offset, buf, bytes)
+ bdrv_pread(child, o
From: Alberto Faria
They currently return the value of their headerlen/buflen parameter on
success. Returning 0 instead makes it clear that short reads/writes are
not possible.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220609152744.389184
From: Alberto Faria
Swap 'buf' and 'bytes' around for consistency with
bdrv_co_{pread,pwrite}(), and in preparation to implement these
functions using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes, flags; @@
- bdrv_pread
From: Alberto Faria
It does not mutate the buffer.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220609152744.3891847-6-afa...@redhat.com>
Reviewed-by: Hanna Reitz
Signed-off-by: Hanna Reitz
---
include/block/block_int-io.h | 2 +-
1 fi
From: Alberto Faria
bdrv_{pread,pwrite}() now return -EIO instead of -EINVAL when 'bytes' is
negative, making them consistent with bdrv_{preadv,pwritev}() and
bdrv_co_{pread,pwrite,preadv,pwritev}().
bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and
clears the BDRV_REQ_MAY_UN
From: Alberto Faria
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush()
separately.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220609152744.3891847-11-afa...@redhat.com>
Reviewed-by: Hanna Reitz
Signed-off-by: Hanna R
From: Alberto Faria
Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the
callers are already coroutine_fn.
Signed-off-by: Alberto Faria
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220609152744.3891847-10-afa...@redhat.com>
Reviewed-b
From: Alberto Faria
They currently return the value of their 'bytes' parameter on success.
Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.
Sig
From: John Snow
Fixes: 58a6fdcc
Signed-off-by: John Snow
Tested-by: Daniel P. Berrangé
Reviewed-by: Daniel P. Berrangé
Message-Id: <20220616142659.3184115-2-js...@redhat.com>
Reviewed-by: Hanna Reitz
Signed-off-by: Hanna Reitz
---
tests/qemu-iotests/223.out | 4 ++--
tests/qemu-iotests/307.
From: Alberto Faria
Also convert bdrv_pwrite_sync() to being implemented using
generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220609152744.3891847-9-afa...@redhat.com>
Reviewed-by: Hanna Reitz
Signed-off-by: Hanna Reitz
From: John Snow
In certain container environments we may not have FUSE at all, so skip
the test in this circumstance too.
Signed-off-by: John Snow
Message-Id: <20220616142659.3184115-3-js...@redhat.com>
Reviewed-by: Thomas Huth
Reviewed-by: Hanna Reitz
Signed-off-by: Hanna Reitz
---
tests/q
From: Alberto Faria
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-14-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/coroutines.h| 3 ---
include/sysemu/block-backend-io.h | 3 ++-
block/block-ba
From: Alberto Faria
They currently return the value of their 'bytes' parameter on success.
Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.
The
From: Alberto Faria
For consistency with other I/O functions, and in preparation to
implement bdrv_{pread,pwrite}() using generated_co_wrapper.
unsigned int fits in int64_t, so all callers remain correct.
bdrv_check_request32() is called further down the stack and causes -EIO
to be returned if
From: Alberto Faria
For consistency with other I/O functions, and in preparation to
implement it using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression blk, offset, buf, bytes; @@
- blk_pread(blk, offset, buf, bytes)
+ blk_pread(blk, offset, buf
From: Alberto Faria
It does not mutate the buffer.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-6-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
include/sysemu/block-backend-io.h | 2 +-
1 file changed, 1 insertion(+
From: Alberto Faria
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-5-afa...@redhat.com>
Signed-off-by: Hanna Reitz
From: Alberto Faria
Implement them using generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-8-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
include/sysemu/block-backend-io.h | 6 +
tests/unit/te
From: Alberto Faria
Implement blk_preadv_part() using generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-9-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/coroutines.h| 5 -
From: Alberto Faria
Also convert it into a generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-10-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/coroutines.h| 5 -
include/sy
From: Alberto Faria
Swap 'buf' and 'bytes' around for consistency with
blk_co_{pread,pwrite}(), and in preparation to implement these functions
using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression blk, offset, buf, bytes, flags; @@
- blk_pread(blk
From: Alberto Faria
Keep generated_co_wrapper and coroutine_fn pairs together. This should
make it clear that each I/O function has these two versions.
Also move blk_co_{pread,pwrite}()'s implementations out of the header
file for consistency.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bo
From: Alberto Faria
Also convert blk_ioctl() into a generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-16-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/coroutines.h| 6 --
i
From: Alberto Faria
Swap 'buf' and 'bytes' around for consistency with other I/O functions.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-11-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
include/sysemu/block-backend-
From: Alberto Faria
Some can be made static, others are unused generated_co_wrappers.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-19-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/coroutines.h| 19
From: Alberto Faria
Also convert blk_pwrite_compressed() into a generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-12-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
include/sysemu/block-backend-io.h |
error_report() only works once monitor_init_globals_core() has been
called, which is not the case when parsing the --daemonize option. Use
fprintf(stderr, ...) instead.
Fixes: 2525edd85fec53e23fda98974a15e3b3c8957596 ("qsd: Add --daemonize")
Signed-off-by: Hanna Reitz
Message-Id: <20220609122852
Currently, the exit notifier for unlinking the PID file is registered
unconditionally. Limit it to only when we actually do create a PID
file.
Signed-off-by: Hanna Reitz
Message-Id: <20220609122701.17172-3-hre...@redhat.com>
Reviewed-by: Daniel P. Berrangé
---
softmmu/vl.c | 18 +--
After writing the PID file, we register an exit notifier to unlink it
when the process terminates. However, if the process has changed its
working directory in the meantime (e.g. in os_setup_post() when
daemonizing), this will not work when the PID file path was relative.
Therefore, pass the absol
From: Alberto Faria
We need to add include/sysemu/block-backend-io.h to the inputs of the
block-gen.c target defined in block/meson.build.
Signed-off-by: Alberto Faria
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-7-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/corou
From: Alberto Faria
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-13-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
include/sysemu/block-backend-io.h | 5 +++--
block/block-backend.c | 8
tests/u
e7874a50ff3f5b20fb46f36958ad ("python: update for mypy 0.950") has added
`warn_unused_ignores = False` to python/setup.cfg, to be able to keep
compatibility with both pre- and post-0.950 mypy versions.
The iotests' mypy.ini needs the same, or 297 will fail (on both pre- and
post-0.950 mypy, as far
From: Alberto Faria
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-15-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
block/coroutines.h| 2 --
include/sysemu/block-backend-io.h | 2 +-
block/block-back
On Fri, Jul 8, 2022 at 11:35 AM John Snow wrote:
>
> Note: patches 10-12 are included for testing simplicity, they shouldn't
> be merged. They will be included in a forthcoming block PR.
Patches 1-9 are fully reviewed. Whose tree should this go in?
>
> V4:
>
> - Addressed concern by Marc-Andre i
From: Alberto Faria
Also convert blk_truncate() into a generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Hanna Reitz
Message-Id: <20220705161527.1054072-17-afa...@redhat.com>
Signed-off-by: Hanna Reitz
---
include/sysemu/block-backend-io.h | 8 +
After writing the PID file, we register an atexit() handler to unlink it
when the process terminates. However, if the process has changed its
working directory in the meantime (e.g. in os_setup_post() when
daemonizing), this will not work when the PID file path was relative.
Therefore, pass the ab
Cc'ing qemu-block@
On 11/7/22 08:38, Motohiro Kawahito wrote:
Hi, I’d like to connect to an encrypted QCOW2 file by
nbd_connect_systemd_socket_activation(), but I got ret=-1 with EINTR.
The arg parameter I used is
qemu-nbd --object secret,id=sec0,data=abc123 --image-opts
driver=qcow2,encrypt
The aim of this series is to reorganize bdrv_try_set_aio_context
and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks in
favour of a new one, ->change_aio_ctx.
More informations in patch 3 (which is also RFC, due to the doubts
I have with AioContext locks).
Patch 1 just add assertions i
Also here ->aio_context is read by I/O threads and written
under BQL.
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block.c b/block.c
index d0db104d71..267a39c0de 100644
--- a/block.c
+++ b/block.c
@@ -7285,6 +7285,7 @@ static void bd
bdrv_child_cb_change_aio_ctx() is identical to
bdrv_child_cb_can_set_aio_ctx(), as we only need
to recursively go on the parent bs.
Note: bdrv_child_try_change_aio_context() is not called by
anyone at this point.
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 9 +
1 file change
First change the transactions from a QLIST to QSIMPLEQ, then
use it to implement tran_add_tail, which allows adding elements
to the end of list transactions.
This is useful if we have some "preparation" transiction callbacks
that we want to run before the others but still only when invoking
finali
Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx,
and call bdrv_child_try_change_aio_context() in
bdrv_try_set_aio_context(), the main function called through
the whole block layer.
>From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx
won't be used anymore.
Signed-off-by:
Together with all _can_set_ and _set_ APIs, as they are not needed
anymore.
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c| 196 -
block/block-backend.c | 33 -
blockjob.c | 35 --
inclu
-
RFC because I am not sure about the AioContext locks.
- Do we need to take the new AioContext lock? what does it protect?
- Taking the old AioContext lock is required now, because of
bdrv_drained_begin calling AIO_WAIT_WHILE that unlocks the
aiocontext. If we replace it with AIO_WAIT_
blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(),
but implements a new transaction so that if all check pass, the new
transaction's .commit will take care of changing the BlockBackend
AioContext. blk_root_set_aio_ctx_commit() is the same as
blk_root_set_aio_ctx().
Note: bdrv
child_job_change_aio_ctx() is very similar to
child_job_can_set_aio_ctx(), but it implements a new transaction
so that if all check pass, the new transaction's .commit()
will take care of changin the BlockJob AioContext.
child_job_set_aio_ctx_commit() is similar to child_job_set_aio_ctx(),
but it d
On 7/13/22 00:49, Stefan Hajnoczi wrote:
> On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote:
>> By adding zone management operations in BlockDriver, storage
>> controller emulation can use the new block layer APIs including
>> zone_report and zone_mgmt(open, close, finish, reset).
>>
>> Signe
Stefan Hajnoczi 于2022年7月12日周二 23:49写道:
>
> On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote:
> > By adding zone management operations in BlockDriver, storage
> > controller emulation can use the new block layer APIs including
> > zone_report and zone_mgmt(open, close, finish, reset).
> >
> >
Damien Le Moal 于2022年7月12日周二 15:35写道:
>
> On 7/12/22 11:13, Sam Li wrote:
> > By adding zone management operations in BlockDriver, storage
> > controller emulation can use the new block layer APIs including
> > zone_report and zone_mgmt(open, close, finish, reset).
> >
> > Signed-off-by: Sam Li
>
On Wed, Jul 13, 2022 at 08:51:45AM +0800, Sam Li wrote:
> Stefan Hajnoczi 于2022年7月12日周二 23:49写道:
> >
> > On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote:
> > > diff --git a/block/file-posix.c b/block/file-posix.c
> > > index 48cd096624..e7523ae2ed 100644
> > > --- a/block/file-posix.c
> > >
1 - 100 of 101 matches
Mail list logo