On Mon, Mar 14, 2022 at 09:36:54AM -0400, Emanuele Giuseppe Esposito wrote:
> In preparation to the job_lock/unlock usage, create _locked
> duplicates of some functions, since they will be sometimes called with
> job_mutex held (mostly within job.c),
> and sometimes without (mostly from JobDrivers
On Mon, Mar 14, 2022 at 09:37:02AM -0400, Emanuele Giuseppe Esposito wrote:
> /**
> * @job: The job to enter.
> + * Called with job_mutex *not* held.
> *
> * Continue the specified job by entering the coroutine.
> + * Called with job_mutex lock *not* held.
A similar comment was added just a
On Mon, Mar 14, 2022 at 09:37:01AM -0400, Emanuele Giuseppe Esposito wrote:
> @@ -135,32 +137,37 @@ void block_job_remove_all_bdrv(BlockJob *job);
> bool block_job_has_bdrv(BlockJob *job, BlockDriverState *bs);
>
> /**
> - * block_job_set_speed:
> + * block_job_set_speed_locked:
> * @job: The
On Mon, Mar 14, 2022 at 09:36:59AM -0400, Emanuele Giuseppe Esposito wrote:
> @@ -530,20 +540,24 @@ void job_enter(Job *job)
> job_enter_cond(job, NULL);
> }
>
> -/* Yield, and schedule a timer to reenter the coroutine after @ns
> nanoseconds.
> +/*
> + * Yield, and schedule a timer to ree
On Mon, Mar 14, 2022 at 09:37:00AM -0400, Emanuele Giuseppe Esposito wrote:
> /**
> - * Release a reference that was previously acquired with job_ref() or
> + * Release a reference that was previously acquired with job_ref_locked() or
> * job_create(). If it's the last reference to the object, i
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 10:51:27AM +0100, Dr. David Alan Gilbert wrote:
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > This makes the field name align with the newly introduced method
> > > names in the previous commit.
> >
> > I thi
On Mon, Mar 14, 2022 at 09:36:52AM -0400, Emanuele Giuseppe Esposito wrote:
> job_event_* functions can all be static, as they are not used
> outside job.c.
>
> Same applies for job_txn_add_job().
>
> Signed-off-by: Emanuele Giuseppe Esposito
> ---
> include/qemu/job.h | 18 --
>
On Thu, Jun 09, 2022 at 10:51:27AM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > This makes the field name align with the newly introduced method
> > names in the previous commit.
>
> I think that's the method in the following commits?
Opps, yeah, I
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This makes the field name align with the newly introduced method
> names in the previous commit.
I think that's the method in the following commits?
tbh I'm not sure about this; 'pos' is still passed to writev_buffer
and get_buffer to say where
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This renames the following QEMUFile fields
>
> * bytes_xfer -> rate_limit_used
> * xfer_limit -> rate_limit_max
>
> The intent is to make it clear that 'bytes_xfer' is specifically related
> to rate limiting of data and applies to data queued,
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The name 'ftell' gives the misleading impression that the QEMUFile
> objects are seekable. This is not the case, as in general we just
> have an opaque stream. The users of this method are only interested
> in the total bytes processed. This switc
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The qemu_update_position method name gives the misleading impression
> that it is changing the current file offset. Most of the files are
> just streams, however, so there's no concept of a file offset in the
> general case.
>
> What this method
If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE
definition, we just find that they "mark and check that the function
is part of the {category} API".
However, ther is no definition on what {category} API is, they are
in include/block/block-*.h
Therefore, add a comment that refers to
On 6/9/22 05:13, Iris Chen wrote:
From: Iris Chen
Signed-off-by: Iris Chen
---
Addressed all comments from V1. The biggest change: removed
object_class_property_add.
Reviewed-by: Cédric Le Goater
Thanks,
C.
hw/block/m25p80.c | 37 +++
t
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 changed, 9 insertions(+), 9 deletions(-)
diff --git a/softmmu/vl.c b/softmm
On Tue, 24 May 2022 at 12:46, Daniel P. Berrangé wrote:
>
> The qemu_update_position method name gives the misleading impression
> that it is changing the current file offset. Most of the files are
> just streams, however, so there's no concept of a file offset in the
> general case.
>
> What this
On Thu, Jun 09, 2022 at 01:56:00PM +0100, Peter Maydell wrote:
> On Tue, 24 May 2022 at 12:46, Daniel P. Berrangé wrote:
> >
> > The qemu_update_position method name gives the misleading impression
> > that it is changing the current file offset. Most of the files are
> > just streams, however, so
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 01:56:00PM +0100, Peter Maydell wrote:
> > On Tue, 24 May 2022 at 12:46, Daniel P. Berrangé
> > wrote:
> > >
> > > The qemu_update_position method name gives the misleading impression
> > > that it is changing the current
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 the process terminates. These
handlers un
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
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
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
---
storage-daemon/qemu-st
On 6/7/22 18:55, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
bs->file and bs->backing are a kind of duplication of part of
bs->children. But very useful diplication, so let's not drop them at
all:)
We should manage bs->file and bs->backing in same place, where we
m
From: Paolo Bonzini
Remove usage of aio_context_acquire by always submitting asynchronous
AIO to the current thread's LinuxAioState.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/file-posix.c | 3 ++-
block/linux-aio.c | 13 ++---
include/block/a
Remove usage of aio_context_acquire by always submitting work items
to the current thread's ThreadPool.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/file-posix.c| 19 +--
block/file-win32.c| 2 +-
block/qcow2-threads.c | 2 +-
util/t
Just remove some AioContext lock in LinuxAioState and ThreadPool.
Not related to anything specific, so I decided to send it as
a separate patch.
These patches are taken from Paolo's old draft series.
Emanuele Giuseppe Esposito (1):
thread-pool: use ThreadPool from the running thread
Paolo Bonz
On 6/7/22 13:53, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
test_parallel_perm_update() does two things that we are going to
restrict in the near future:
1. It updates bs->file field by hand. bs->file will be managed
automatically by generic code (together wit
From: Bernhard Beschow
The comment is based on commit message
ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk
unplug option'. Since it seems to describe design decisions and
limitations that still apply it seems worth having.
Signed-off-by: Bernhard Beschow
Reviewed-by:
This serie aims to free virtio-blk (and in the future all
virtio devices) from the AioContext lock.
First step is to understand which functions are running in
the main loop and which are in iothreads.
Because many functions in virtio-blk are callbacks called
in some other virtio (pci, mmio, bus an
AioContext lock was introduced in b9e413dd375 and in this instance
it is used to protect these 3 functions:
- virtio_blk_handle_rw_error
- virtio_blk_req_complete
- block_acct_done
Now that all three of the above functions are protected with
their own locks, we can get rid of the AioContext lock.
virtio_queue_aio_attach_host_notifier() and
virtio_queue_aio_attach_host_notifier_nopoll() run always in the
main loop, so there is no need to protect them with AioContext
lock.
On the other side, virtio_queue_aio_detach_host_notifier() runs
in a bh in the iothread context, but it is always schedu
s->rq is pointing to the the VirtIOBlockReq list, and this list is
read/written in:
virtio_blk_reset = main loop, but caller calls ->stop_ioeventfd() and
drains, so no iothread runs in parallel
virtio_blk_save_device = main loop, but VM is stopped (migration), so
iothread has no work on request li
Just as done in the block API, mark functions in virtio-blk
that are always called in the main loop with BQL held.
We know such functions are GS because they all are callbacks
from virtio.c API that has already classified them as GS.
Signed-off-by: Emanuele Giuseppe Esposito
---
hw/block/datapl
Just as done in the block API, mark functions in virtio-blk
that are called also from iothread(s).
We know such functions are IO because many are blk_* callbacks,
running always in the device iothread, and remaining are propagated
from the leaf IO functions (if a function calls a IO_CODE function,
On Wed, Jun 8, 2022 at 1:50 PM Stefan Hajnoczi wrote:
> Yes, that's fine. My main concern is that callers have been audited when
> errnos are changed. If you switch bdrv_{pread,pwrite}() to -EIO and have
> audited callers, then I'm happy.
>
> Consistent -EINVAL would be nice in the future, but I t
From: Bernhard Beschow
Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci
generic class init function' already resolved redundant code which in
turn rendered piix3-ide-xen redundant.
Signed-off-by: Bernhard Beschow
Reviewed-by: Anthony PERARD
Message-Id: <20220513180957.90514
From: Bernhard Beschow
This function was declared in a generic and public header, implemented
in a device-specific source file but only used in xen_platform. Given its
'aux' parameter, this function is more xen-specific than piix-specific.
Also, the hardcoded magic constants seem to be generic an
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, offset, buf, bytes, 0)
Also convert bdrv_pwrite_sync() to being implemented using
generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
---
block/io.c | 9 +
include/block/block-io.h | 8 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/block/io.c b/b
On 5/26/22 21:51, Vladimir Sementsov-Ogievskiy wrote:
On 5/26/22 19:46, Vladimir Sementsov-Ogievskiy wrote:
On 4/7/22 16:27, Vladimir Sementsov-Ogievskiy wrote:
Hi all!
v4: Now based on master
01: add assertion and r-b
02: s/7.0/7.1/ and r-b
03: switch to QEMUMachine, touch-up pylintrc, drop
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, offset, buf, bytes, 0)
This function in virtio_blk_data_plane_start is directly
invoked, accessing the queued requests from the main loop,
while the device has already switched to the iothread context.
The only place where calling virtio_blk_process_queued_requests
from the main loop is allowed is when blk_set_aio_conte
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 few callers that rely
It is read from IO_CODE and written with BQL held,
so setting it as atomic should be enough.
Also remove the aiocontext lock that was sporadically
taken around the set.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-backend.c | 6 +++---
hw/block/virtio-blk.c | 4
2 files change
All the callbacks below are always running in the main loop.
The callbacks are the following:
- start/stop_ioeventfd: these are the callbacks where
blk_set_aio_context(iothread) is done, so they are called in the main
loop.
- save and load: called during migration, when VM is stopped from the
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 'bytes' is negative or
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(child, offset, buf, b
On 6/7/22 18:58, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
Now the indirection is not actually used, we can safely reduce it to
simple pointer.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/snapshot.c | 39 +--
1 fi
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_UNMAP flag when appropri
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
---
block/parallels.c | 2 +-
block/qcow2-snapshot.c | 6 +++---
block/qcow2.c | 4 ++--
3 files changed,
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush()
separately.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
---
block/qcow2.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f2fb54c51f..90a2dd406b 100
Start by making the interfaces of analogous non-coroutine and coroutine
functions consistent with each other, then implement the non-coroutine
ones using generated_co_wrapper.
For the bdrv_pwrite_sync() case, also add the missing
bdrv_co_pwrite_sync() function.
Changes v3 --> v4:
- Removed `asser
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 'bytes' is negative or
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
---
block/crypto.c | 52 +++
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_UNMAP flag when appropri
On 6/8/22 14:49, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
To be used in further commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 48
1 file changed, 48 insertions(+)
Looking at bdrv_child_tr
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> With this change, all QEMUFile usage is backed by QIOChannel at
> last.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/savevm.c | 42 --
> 1 file changed, 4
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The only user of the hooks is RDMA which provides a QIOChannel backed
> impl of QEMUFile. It can thus use the qemu_file_get_ioc() method.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file.c
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The only callers of qemu_fopen_ops pass 'true' for the 'has_ioc'
> parameter, so hardcode this assumption in QEMUFile, by passing in
> the QIOChannel object as a non-opaque parameter.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David
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
---
block/qcow2.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
in
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 few callers that rely
Start by making the interfaces of analogous non-coroutine and coroutine
functions consistent with each other, then implement the non-coroutine
ones using generated_co_wrapper.
For the bdrv_pwrite_sync() case, also add the missing
bdrv_co_pwrite_sync() function.
Changes v4 --> v5:
- Picking up a f
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
---
block/crypto.c | 52 +-
block/qco
It does not mutate the buffer.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
---
include/block/block_int-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index bb454200e5..d4d3bed783 100644
--- a/inclu
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote:
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > This directly implements the shutdown logic using QIOChannel APIs.
> > >
> > > Signed-off-by: Daniel P. Berrangé
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the set_blocking logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 14 --
> migration/qemu-file.c | 4
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
---
block/parallels.c | 2 +-
block/qcow2-snapshot.c | 6 +++---
block/qcow2.c
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(child, offset, buf, b
It does not mutate the buffer.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Stefan Hajnoczi
---
include/block/block_int-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index bb454200e5.
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
---
block/io.c | 9 +
include/block/block-io.h | 8 ++--
2 files changed, 11 insertions(+), 6 deletions(-
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Prepare for the elimination of QEMUFileOps by introducing a pair of new
> constructors. This lets us distinguish between an input and output file
> object explicitly rather than via the existance of specific callbacks.
>
> Signed-off-by: Daniel P
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the get_buffer logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> migration/qemu-file-channel.c | 29 -
> migration/qemu-file.c | 18 --
> migr
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the shutdown logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> migration/qemu-file-channel.c | 27 ---
> migration/qemu-file.c | 10 +++---
> migration/qemu-f
On Thu, Jun 09, 2022 at 08:22:06AM -0400, Emanuele Giuseppe Esposito wrote:
> If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE
> definition, we just find that they "mark and check that the function
> is part of the {category} API".
> However, ther is no definition on what {category}
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the close logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 12
> migration/qemu-file.c | 12 ++---
From: Vladimir Sementsov-Ogievskiy
At the end we ignore failure of bdrv_merge_dirty_bitmap() and report
success. And still set errp. That's wrong.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Nikita Lapshin
Reviewed-by: Kevin Wolf
Message-Id: <20220517111206.23585-2-v.sementsov...
An unlucky I/O pattern can result in stalled Linux AIO requests when the
plugged counter becomes unbalanced. See Patch 1 for details.
Patch 2 adds a comment to explain why the laio_io_unplug() even checks max
batch in the first place.
Stefan Hajnoczi (2):
linux-aio: fix unbalanced plugged count
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file.h | 4
> 1 file changed, 4 deletions(-)
>
> diff --git a/migration/qemu-file.h b/migration/qemu-file.h
> index 07c86bfea3..674c2c409b 1006
On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > This directly implements the shutdown logic using QIOChannel APIs.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
> > migration/qemu-file-channel.c | 27
Every laio_io_plug() call has a matching laio_io_unplug() call. There is
a plugged counter that tracks the number of levels of plugging and
allows for nesting.
The plugged counter must reflect the balance between laio_io_plug() and
laio_io_unplug() calls accurately. Otherwise I/O stalls occur sinc
It may not be obvious why laio_io_unplug() checks max batch. I discussed
this with Stefano and have added a comment summarizing the reason.
Cc: Stefano Garzarella
Cc: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
---
block/linux-aio.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/block
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the writev_buffer logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> migration/qemu-file-channel.c | 43 ---
> migration/qemu-file.c | 24 +++--
From: Eric Blake
CID 1488362 points out that the second 'rc >= 0' check is now dead
code.
Reported-by: Peter Maydell
Fixes: 172f5f1a40(nbd: remove peppering of nbd_client_connected)
Signed-off-by: Eric Blake
Message-Id: <20220516210519.76135-1-ebl...@redhat.com>
Reviewed-by: Peter Maydell
Rev
From: Fabian Ebner
On 64-bit platforms, assigning SIZE_MAX to the int64_t max_pdiscard
results in a negative value, and the following assertion would trigger
down the line (it's not the same max_pdiscard, but computed from the
other one):
qemu-system-x86_64: ../block/io.c:3166: bdrv_co_pdiscard:
From: Xie Yongji
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220523084611.91-5-xieyon...@bytedance.com>
Signed-off-by: Kevin Wolf
---
linux-headers/linux/vduse.
On Thu, Jun 09, 2022 at 05:46:29PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > This directly implements the get_buffer logic using QIOChannel APIs.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
> > migration/qemu-file-channel.c | 29 --
On Thu, Jun 09, 2022 at 05:59:00PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > Now that all QEMUFile callbacks are removed, the entire concept can be
> > deleted.
> >
> > Signed-off-by: Daniel P. Berrangé
>
> I think that's OK, there's one nit - y
From: Xie Yongji
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220523084611.91-2-xieyon...@bytedance.com>
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 2 +-
1 f
From: Xie Yongji
This implements a VDUSE block backends based on
the libvduse library. We can use it to export the BDSs
for both VM and container (host) usage.
The new command-line syntax is:
$ qemu-storage-daemon \
--blockdev file,node-name=drive0,filename=test.img \
--export vduse-blk
From: Vladimir Sementsov-Ogievskiy
We don't need extra bitmap. All we need is to backup the original
bitmap when we do first merge. So, drop extra temporary bitmap and work
directly with target and backup.
Still to keep old semantics, that on failure target is unchanged and
user don't need to re
From: Emanuele Giuseppe Esposito
It seems that aio_wait_kick always required a memory barrier
or atomic operation in the caller, but nobody actually
took care of doing it.
Let's put the barrier in the function instead, and pair it
with another one in AIO_WAIT_WHILE. Read aio_wait_kick()
comment
The following changes since commit 028f2361d0c2d28d6f918fe618f389228ac22b60:
Merge tag 'pull-target-arm-20220609' of
https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-06-09
06:47:03 -0700)
are available in the Git repository at:
git://repo.or.cz/qemu/kevin.gi
From: Stefano Garzarella
If the namespace does not exist, rbd_create() fails with -ENOENT and
QEMU reports a generic "error rbd create: No such file or directory":
$ qemu-img create rbd:rbd/namespace/image 1M
Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
qemu-img: rbd:rb
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Now that all QEMUFile callbacks are removed, the entire concept can be
> deleted.
>
> Signed-off-by: Daniel P. Berrangé
I think that's OK, there's one nit - you remove qemu_get_fd from one of
the headers; I think that probably belongs in an ear
From: Xie Yongji
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xi
On Thu, Jun 09, 2022 at 05:47:11PM +0100, Stefan Hajnoczi wrote:
Every laio_io_plug() call has a matching laio_io_unplug() call. There is
a plugged counter that tracks the number of levels of plugging and
allows for nesting.
The plugged counter must reflect the balance between laio_io_plug() and
From: Xie Yongji
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
Messa
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the get_return_path logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 16
> migration/qemu-file.c
From: Xie Yongji
Abstract the common logic of virtio-blk I/O process to a function
named virtio_blk_process_req(). It's needed for the following commit.
Signed-off-by: Xie Yongji
Message-Id: <20220523084611.91-4-xieyon...@bytedance.com>
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Kevin Wolf
-
From: Xie Yongji
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220523084611.91-8-xieyon...@bytedanc
1 - 100 of 111 matches
Mail list logo