Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/baum.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chardev/baum.c b/chardev/baum.c
index 0822e9ed5f3..bc09cda3471 100644
--- a/chardev/baum.c
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/block/nvme.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 2f6d4925826..905c4bb57af 100644
---
We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not
a big value, it is actually 84). Instead of having the compiler
use variable-length array, declare an array able to hold the
maximum 'x * y'.
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/baum.c | 8
1 file changed, 4
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
util/iov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/iov.c b/util/iov.c
index 58c7b35..fc76d717e14 100644
--- a/util/iov.c
+++ b/util/iov.c
@@
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
ui/vnc-enc-tight.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index cebd35841a9..ff6027cf8d4 100644
We know 'pf.bytes_per_pixel' will be at most 'VNC_SERVER_FB_BYTES'
(which is actually 4 bytes for 32bpp). Instead of having the compiler
use variable-length array, use this 'small' maximum length and
autofree to allocate the buffer on the heap.
Signed-off-by: Philippe Mathieu-Daudé
---
On Thu, May 6, 2021 at 1:15 AM Philippe Mathieu-Daudé
wrote:
> Use autofree heap allocation instead of variable-length
> array on the stack.
>
> Signed-off-by: Philippe Mathieu-Daudé
>
Reviewed-by: Marc-André Lureau
---
> chardev/baum.c | 3 ++-
> 1 file changed, 2 insertions(+), 1
On Thu, May 6, 2021 at 1:13 AM Philippe Mathieu-Daudé
wrote:
> Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX.
>
> Signed-off-by: Philippe Mathieu-Daudé
>
Reviewed-by: Marc-André Lureau
> ---
> chardev/baum.c | 11 +++
> 1 file changed, 7 insertions(+), 4
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
tests/unit/test-vmstate.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c
index
+Eric
On 5/5/21 11:22 PM, Keith Busch wrote:
> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote:
>> The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is
>> a constant! Help it by using a definitions instead.
>
> I don't understand.
Neither do I TBH...
> It's
The contents of this patch were initially developed and posted by Han
Han[1], however, it appears the original patch was not applied. Since
then, the relevant documentation has been moved and adapted to a new
format.
I've taken most of the original wording and tweaked it according to
some of the
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/ppc/pnv.c | 4 ++--
hw/ppc/spapr.c | 8
hw/ppc/spapr_pci_nvlink2.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
target/ppc/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index ae62daddf7d..90d0230eb86 100644
---
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/intc/xics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 68f9d44feb4..c293d00d5c4 100644
--- a/hw/intc/xics.c
+++
Use autofree heap allocation instead of variable-length array on
the stack. Replace the snprintf() call by g_strdup_printf().
Signed-off-by: Philippe Mathieu-Daudé
---
hw/i386/multiboot.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/i386/multiboot.c
Now that we converted all variable-length allocations in the
repository, add the -Wvla CPPFLAG to trigger a build failure
if such allocation is used.
This should help avoiding vulnerabilities such CVE-2021-3527
(see commit range 3f67e2e7f13..05a40b172e4).
Inspired-by: Gerd Hoffmann
Philippe Mathieu-Daudé, le mer. 05 mai 2021 23:10:27 +0200, a ecrit:
> We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not
> a big value, it is actually 84). Instead of having the compiler
> use variable-length array, declare an array able to hold the
> maximum 'x * y'.
>
>
05.05.2021 19:25, Max Reitz wrote:
On 05.05.21 17:05, Vladimir Sementsov-Ogievskiy wrote:
03.05.2021 12:54, Max Reitz wrote:
In the bdrv_snapshot_goto() fallback code, we work with a pointer to
either bs->file or bs->backing.
We close that child,
Do we?
We *detach it.
close the node
The compiler isn't clever enough to figure 'width' is a constant,
so help it by using a definitions instead.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/usb/hcd-ohci.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index
The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is
a constant! Help it by using a definitions instead.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index
Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX.
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/baum.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/chardev/baum.c b/chardev/baum.c
index 5deca778bc4..adc3d7b3b56 100644
--- a/chardev/baum.c
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
block/vpc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 17a705b482a..9ed144331fd 100644
--- a/block/vpc.c
+++
Hi,
This series is inspired by Gerd Hoffmann and CVE-2021-3527.
It removes all uses of variable-length arrays in the repository,
then enable the '-Wvla' warning to avoid new code using vla
to be merged.
Mostly trivial patches using GLib autofree.
Please review,
Phil.
(based on usb-20210505
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/net/fsl_etsec/rings.c | 9 -
hw/net/rocker/rocker_of_dpa.c | 2 +-
net/dump.c| 2 +-
net/tap.c | 2 +-
4 files changed, 7
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
ui/spice-display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index d22781a23d0..61c4259363b 100644
---
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/usb/hcd-xhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 7acfb8137bc..59a267e3c8b 100644
---
Philippe Mathieu-Daudé, le mer. 05 mai 2021 23:10:28 +0200, a ecrit:
> Use autofree heap allocation instead of variable-length
> array on the stack.
>
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Samuel Thibault
> ---
> chardev/baum.c | 3 ++-
> 1 file changed, 2 insertions(+), 1
On Wed, May 5, 2021, 5:10 PM Eric Blake wrote:
> On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote:
> > +Eric
> >
> > On 5/5/21 11:22 PM, Keith Busch wrote:
> >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote:
> >>> The compiler isn't clever enough to figure
05.05.2021 19:23, Max Reitz wrote:
On 04.05.21 10:25, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/write-threshold.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/write-threshold.c b/block/write-threshold.c
index
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
ui/curses.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/curses.c b/ui/curses.c
index e4f9588c3e8..f490b2d839d 100644
--- a/ui/curses.c
+++
On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote:
> +Eric
>
> On 5/5/21 11:22 PM, Keith Busch wrote:
>> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote:
>>> The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is
>>> a constant! Help it by using a definitions instead.
Use autofree heap allocation instead of variable-length
array on the stack.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/block/dataplane/virtio-blk.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
The combined_key[... QIO_CHANNEL_WEBSOCK_GUID_LEN ...] array in
qio_channel_websock_handshake_send_res_ok() expands to a call
to strlen(QIO_CHANNEL_WEBSOCK_GUID), and the compiler doesn't
realize the string is const, so consider combined_key[] being
a variable-length array.
To remove the
The compiler isn't clever enough to figure 'min_buf_size'
is a constant, so help it by using a definitions instead.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/net/e1000e_core.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/net/e1000e_core.c
On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote:
> The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is
> a constant! Help it by using a definitions instead.
I don't understand. It's labeled 'const', so any reasonable compiler
will place it in the 'text' segment
On Thu, May 6, 2021 at 1:14 AM Philippe Mathieu-Daudé
wrote:
> We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not
> a big value, it is actually 84). Instead of having the compiler
> use variable-length array, declare an array able to hold the
> maximum 'x * y'.
>
> Signed-off-by:
Marc-André Lureau, le jeu. 06 mai 2021 01:27:25 +0400, a ecrit:
> @@ -408,7 +408,7 @@ static int baum_eat_packet(BaumChardev *baum, const
> uint8_t *buf, int len)
> }
> timer_del(baum->cellCount_timer);
>
> - memset(zero, 0, sizeof(zero));
> +
Philippe Mathieu-Daudé, le mer. 05 mai 2021 23:10:26 +0200, a ecrit:
> Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX.
>
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Samuel Thibault
> ---
> chardev/baum.c | 11 +++
> 1 file changed, 7 insertions(+), 4
On Wed, May 05, 2021 at 11:10:35PM +0200, Philippe Mathieu-Daudé wrote:
> Use autofree heap allocation instead of variable-length
> array on the stack.
>
> Signed-off-by: Philippe Mathieu-Daudé
Acked-by: David Gibson
> ---
> hw/intc/xics.c | 2 +-
> 1 file changed, 1 insertion(+), 1
On Wed, May 05, 2021 at 11:10:45PM +0200, Philippe Mathieu-Daudé wrote:
> Use autofree heap allocation instead of variable-length
> array on the stack.
>
> Signed-off-by: Philippe Mathieu-Daudé
Acked-by: David Gibson
> ---
> target/ppc/kvm.c | 2 +-
> 1 file changed, 1 insertion(+), 1
在 2021/5/6 上午5:10, Philippe Mathieu-Daudé 写道:
The compiler isn't clever enough to figure 'min_buf_size'
is a constant, so help it by using a definitions instead.
Signed-off-by: Philippe Mathieu-Daudé
Acked-by: Jason Wang
---
hw/net/e1000e_core.c | 7 ---
1 file changed, 4
On Wed, May 05, 2021 at 06:09:10PM -0500, Eric Blake wrote:
> On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote:
> > +Eric
> >
> > On 5/5/21 11:22 PM, Keith Busch wrote:
> >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote:
> >>> The compiler isn't clever enough to figure
On Wed, May 05, 2021 at 11:10:39PM +0200, Philippe Mathieu-Daudé wrote:
> Use autofree heap allocation instead of variable-length
> array on the stack.
>
> Signed-off-by: Philippe Mathieu-Daudé
fsl_etsec parts
Acked-by: David Gibson
> ---
> hw/net/fsl_etsec/rings.c | 9 -
>
On Wed, May 05, 2021 at 11:10:34PM +0200, Philippe Mathieu-Daudé wrote:
> Use autofree heap allocation instead of variable-length
> array on the stack.
>
> Signed-off-by: Philippe Mathieu-Daudé
Acked-by: David Gibson
> ---
> hw/ppc/pnv.c | 4 ++--
> hw/ppc/spapr.c |
Thank you.
On 5/5/2021 6:36 AM, Daniel P. Berrangé wrote:
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 6 ++
2 files changed, 7 insertions(+)
diff --git a/block/qcow2.h b/block/qcow2.h
index b8b1093b61..58fd7f1678 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 12 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.h b/block/qcow2.h
index c0e1e83796..b8b1093b61 100644
--- a/block/qcow2.h
- use g_autofree for l1_table
- better name for size in bytes variable
- reduce code blocks nesting
- whitespaces, braces, newlines
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2-refcount.c | 98 +-
1 file changed, 50 insertions(+), 48
Let's pass the whole L2 entry and not bother with
L2E_COMPRESSED_OFFSET_SIZE_MASK.
It also helps further refactoring that adds generic
qcow2_parse_compressed_l2_entry() helper.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2.h | 1 -
We'll reuse the function to fix wrong L2 entry bitmap. Support it now.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2-refcount.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/block/qcow2-refcount.c
Check subcluster bitmap of the l2 entry for different types of
clusters:
- for compressed it must be zero
- for allocated check consistency of two parts of the bitmap
- for unallocated all subclusters should be unallocated
(or zero-plain)
For unallocated clusters we can safely fix the
Split checking for reserved bits out of aligned offset check.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 10 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.h
Add helper to parse compressed l2_entry and use it everywhere instead
of open-coding.
Note, that in most places we move to precise coffset/csize instead of
sector-aligned. Still it should work good enough for updating
refcounts.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric
Hi all!
Here are some good refactorings and new (qemu-img check) checks for
qcow2.
v2:
Fix wording and typos found by Eric, and add r-bs to all except 08.
08: move g_try_malloc down
Vladimir Sementsov-Ogievskiy (10):
qcow2-refcount: improve style of check_refcounts_l2()
qcow2: compressed
- don't use same name for size in bytes and in entries
- use g_autofree for l2_table
- add whitespace
- fix block comment style
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2-refcount.c | 47 +-
1 file changed, 24
Split fix_l2_entry_by_zero() out of check_refcounts_l2() to be
reused in further patch.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/qcow2-refcount.c | 87 +-
1 file changed, 60 insertions(+), 27 deletions(-)
diff --git
Peter Maydell writes:
> On Sun, 2 May 2021 at 21:31, Philippe Mathieu-Daudé wrote:
>>
>> The TYPE_NAND device is bus-less, thus isn't reset automatically.
>> Register a reset handler to get reset with the machine.
>>
>> Fixed: 7426aa72c36 ("nand: Don't inherit from Sysbus")
>> Signed-off-by:
28.04.2021 22:50, Vladimir Sementsov-Ogievskiy wrote:
28.04.2021 20:03, Kevin Wolf wrote:
Am 28.04.2021 um 17:17 hat Vladimir Sementsov-Ogievskiy geschrieben:
Hi all!
And here is v4.
Thanks, applied to the block branch.
Thanks! And thanks a lot for reviewing!
Though the error message
04.05.2021 22:54, Eric Blake wrote:
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
Split checking for reserved bits out of aligned offset check.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 10 +-
2 files changed,
04.05.2021 22:53, Eric Blake wrote:
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
- use g_autofree for l1_table
- better name for size in bytes variable
- reduce code blocks nesting
- whitespaces, braces, newlines
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
We are generally moving to int64_t for both offset and bytes parameters
on all io paths.
Main motivation is realization of 64-bit write_zeroes operation for
fast zeroing large disk chunks, up to the whole disk.
We chose signed type, to be consistent with off_t (which is signed) and
with
Commit 3108a15cf (block: introduce bdrv_drop_filter()) introduced uninitialized
variable to_cow_parent in bdrv_replace_node_common function that is used only
when
detach_subchain is true. It is used in two places. First if block properly
initialize
the variable and second block use it.
However,
Patchew URL:
https://patchew.org/QEMU/20210505075001.45041-1-vsement...@virtuozzo.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20210505075001.45041-1-vsement...@virtuozzo.com
Subject: [PATCH v5 00/11] 64bit
On Mon, Apr 19, 2021 at 10:55:34AM +0200, Emanuele Giuseppe Esposito wrote:
No commit description. What about write thresholds makes them thread
unsafe? Without a commit description reviewers have to reverse-engineer
the patch to figure out the author's intention, which can lead to
On Mon, Apr 19, 2021 at 10:55:41AM +0200, Emanuele Giuseppe Esposito wrote:
> block/block-backend.c | 4
> block/mirror.c| 9 -
> blockdev.c| 19 ++-
> 3 files changed, 6 insertions(+), 26 deletions(-)
There are still many
On 05/05/21 10:05, Vladimir Sementsov-Ogievskiy wrote:
diff --git a/block.c b/block.c
index 874c22c43e..3ca27bd2d9 100644
--- a/block.c
+++ b/block.c
@@ -4851,7 +4851,7 @@ static int
bdrv_replace_node_common(BlockDriverState *from,
Transaction *tran = tran_new();
On Wed, Apr 07, 2021 at 04:35:00PM +0200, Greg Kurz wrote:
> Host notifiers are guaranteed to be idle until the callbacks are
> hooked up with virtio_queue_aio_set_host_notifier_handler(). They
> thus don't need to be set or unset with the AioContext lock held.
>
> Do this outside the critical
05.05.2021 13:03, Paolo Bonzini wrote:
On 05/05/21 10:05, Vladimir Sementsov-Ogievskiy wrote:
diff --git a/block.c b/block.c
index 874c22c43e..3ca27bd2d9 100644
--- a/block.c
+++ b/block.c
@@ -4851,7 +4851,7 @@ static int bdrv_replace_node_common(BlockDriverState
*from,
Transaction *tran
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Signed-off-by: Daniel P. Berrangé
---
We are generally moving to int64_t for both offset and bytes parameters
on all io paths.
Main motivation is realization of 64-bit write_zeroes operation for
fast zeroing large disk chunks, up to the whole disk.
We chose signed type, to be consistent with off_t (which is signed) and
with
We are going to convert .bdrv_co_preadv_part and .bdrv_co_pwritev_part
to int64_t type for offset and bytes parameters (as it's already done
for generic block/io.c layer).
In qcow2 .bdrv_co_preadv_part is used in some places, so let's add
corresponding checks and assertions.
Signed-off-by:
We are generally moving to int64_t for both offset and bytes parameters
on all io paths.
Main motivation is realization of 64-bit write_zeroes operation for
fast zeroing large disk chunks, up to the whole disk.
We chose signed type, to be consistent with off_t (which is signed) and
with
We are generally moving to int64_t for both offset and bytes parameters
on all io paths.
Main motivation is realization of 64-bit write_zeroes operation for
fast zeroing large disk chunks, up to the whole disk.
We chose signed type, to be consistent with off_t (which is signed) and
with
We are going to support 64 bit write-zeroes requests. Now update the
limit variable. It's absolutely safe. The variable is set in some
drivers, and used in bdrv_co_do_pwrite_zeroes().
Update also max_write_zeroes variable in bdrv_co_do_pwrite_zeroes(), so
that bdrv_co_do_pwrite_zeroes() is now
Hi!
Kindly remind. Didn't you forget? I'm responsible for these two tests, let me
know if you don't have time, and I'll resend this series :)
29.03.2021 16:26, Max Reitz wrote:
Hi,
When reviewing Vladimir’s new addition to tests/, I noticed that 297 so
far does not cover named tests. That
05.05.2021 10:59, Miroslav Rezanina wrote:
Commit 3108a15cf (block: introduce bdrv_drop_filter()) introduced uninitialized
variable to_cow_parent in bdrv_replace_node_common function that is used only
when
detach_subchain is true. It is used in two places. First if block properly
initialize
On Mon, Apr 19, 2021 at 10:55:40AM +0200, Emanuele Giuseppe Esposito wrote:
> @@ -210,7 +212,7 @@ static int replication_return_value(BDRVReplicationState
> *s, int ret)
> }
>
> if (ret < 0) {
> -s->error = ret;
> +qatomic_set(>error, ret);
> ret = 0;
> }
On Wed, Apr 07, 2021 at 04:35:01PM +0200, Greg Kurz wrote:
> This allows the virtio-scsi-pci device to batch the setup of all its
> host notifiers. This significantly improves boot time of VMs with a
> high number of vCPUs, e.g. from 6m5.563s down to 1m2.884s for a
> pseries machine with 384
Am 04.05.2021 um 08:56 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 03.05.2021 14:05, Kevin Wolf wrote:
> > These are two follow-up fixes for Vladimir's "block: update graph
> > permissions update". The bugs were reported by Coverity.
> >
> > Kevin Wolf (2):
> >block: Fix Transaction leak
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Signed-off-by: Daniel P. Berrangé
---
block/qapi.c |
- Original Message -
> From: "Peter Maydell"
> To: "Miroslav Rezanina"
> Cc: "QEMU Developers" , "Vladimir Sementsov-Ogievskiy"
> ,
> "Qemu-block"
> Sent: Wednesday, May 5, 2021 12:43:44 PM
> Subject: Re: Prevent compiler warning on block.c
>
> On Wed, 5 May 2021 at 09:06, Miroslav
On Mon, Apr 19, 2021 at 10:55:35AM +0200, Emanuele Giuseppe Esposito wrote:
> For simplicity, use bdrv_drained_begin/end to avoid concurrent
> writes to the write threshold, or reading it while it is being set.
> qmp_block_set_write_threshold is protected by the BQL.
>
> Reviewed-by: Stefan
Hi Stefan!
Note my "[PATCH v2 0/9] block: refactor write threshold", it's a kind of
counter-proposal for first half of this series.
05.05.2021 11:50, Stefan Hajnoczi wrote:
On Mon, Apr 19, 2021 at 10:55:34AM +0200, Emanuele Giuseppe Esposito wrote:
No commit description. What about write
Am 04.05.2021 um 18:06 hat Vladimir Sementsov-Ogievskiy geschrieben:
> Set bdi->is_dirty, so that qemu-img info could show dirty flag.
>
> After this commit the following check will show '"dirty-flag": true':
>
> ./build/qemu-img create -f qcow2 -o lazy_refcounts=on x 1M
> ./build/qemu-io x
>
On 19/04/21 10:55, Emanuele Giuseppe Esposito wrote:
+ *
+ * Called with AioContext lock held.
... for @to_replace_bs.
aio_context_acquire(replace_aio_context);
+if (!check_to_replace_node(bs, to_replace_bs, replaces, errp)) {
A release is missing here.
Paolo
+
On 19/04/21 10:55, Emanuele Giuseppe Esposito wrote:
Replication functions are mostly called when the BDS is quiescent and
does not have any pending I/O. They do not need to synchronize on
anything since BDS and BB are now thread-safe.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Signed-off-by: Daniel P. Berrangé
---
On Wed, 5 May 2021 at 09:06, Miroslav Rezanina wrote:
>
> Commit 3108a15cf (block: introduce bdrv_drop_filter()) introduced
> uninitialized
> variable to_cow_parent in bdrv_replace_node_common function that is used only
> when
> detach_subchain is true. It is used in two places. First if block
There are only two drivers supporting vmstate: qcow2 and sheepdog.
Sheepdog is deprecated. In qcow2 these requests go through
.bdrv_co_p{read,write}v_part handlers.
So, let's do our basic check for the request on vmstate generic
handlers.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
Hi all!
v5: rebase on master, fix block comments style and over-80 line.
01: s/{}/()/ in subject, so that email not to be mangled.
part II aims to update block drivers to int64_t.
I remind that main aim of this update of the whole block-layer to 64bit
is to implement 64bit write-zeroes NBD
On Mon, Apr 19, 2021 at 10:55:36AM +0200, Emanuele Giuseppe Esposito wrote:
What is the goal? Making the notifier APIs usable from multiple threads
(when callers respect RCU)?
> Note that calling rcu_read_lock() is left to the caller. In fact,
> if the notifier is really only used within the
On Mon, Apr 19, 2021 at 10:55:38AM +0200, Emanuele Giuseppe Esposito wrote:
> Reviewed-by: Stefan Hajnoczi
> Signed-off-by: Paolo Bonzini
> Signed-off-by: Emanuele Giuseppe Esposito
> ---
> include/block/block_int.h | 5 -
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git
On Thu, Apr 22, 2021 at 01:09:50AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> @@ -1981,8 +1985,15 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t
> offset, int64_t bytes,
> } else {
> assert(child->perm & BLK_PERM_WRITE);
> }
> -return
05.05.2021 13:10, Stefan Hajnoczi wrote:
On Thu, Apr 22, 2021 at 01:09:50AM +0300, Vladimir Sementsov-Ogievskiy wrote:
@@ -1981,8 +1985,15 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t
offset, int64_t bytes,
} else {
assert(child->perm & BLK_PERM_WRITE);
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Signed-off-by: Daniel P. Berrangé
---
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Signed-off-by: Daniel P. Berrangé
---
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Daniel P. Berrangé (7):
migration: use GDateTime for
The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.
Signed-off-by: Daniel P. Berrangé
---
We modify the request by adding an offset to vmstate. Let's check the
modified request. It will help us to safely move .bdrv_co_preadv_part
and .bdrv_co_pwritev_part to int64_t type of offset and bytes.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block_int.h | 3 +++
We are going to support 64 bit discard requests. Now update the
limit variable. It's absolutely safe. The variable is set in some
drivers, and used in bdrv_co_pdiscard().
Update also max_pdiscard variable in bdrv_co_pdiscard(), so that
bdrv_co_pdiscard() is now prepared to 64bit requests. The
1 - 100 of 141 matches
Mail list logo