On Fri, 08/04 16:49, Daniel P. Berrange wrote:
> This is odd. In the bdrv_aligned_readv() it looks very much like
> we'll reference qiov->niov, if bytes != 0, so if qiov was NULL we
> would crash.
It doesn't make sense if read doesn't have an iov, where should the data be
placed? :)
>
> In
On 08/07/2017 10:45 AM, Markus Armbruster wrote:
> Byte counts should use QAPI type 'size' (uint64_t). BlockDirtyInfo
> member @count is 'int' (int64_t). bdrv_query_dirty_bitmaps() computes
> @count from bdrv_get_dirty_count() in uint64_t, then implicitly
> converts to int64_t. Before the
On 08/07/2017 10:45 AM, Markus Armbruster wrote:
> Block dirty bitmaps represent granularity in bytes as uint32_t. It
> must be a power of two and a multiple of BDRV_SECTOR_SIZE.
>
> The trouble with uint32_t is computations like this one in
> mirror_do_read():
>
> uint64_t max_bytes;
>
On 08/07/2017 10:45 AM, Markus Armbruster wrote:
> hbitmap_count() returns uint64_t.
>
> Clean up test-hbitmap.c to check its value with g_assert_cmpuint()
> instead of g_assert_cmpint().
>
> bdrv_get_dirty_count() and bdrv_get_meta_dirty_count() return its
> value converted to int64_t. Clean
On 08/07/2017 06:29 PM, Jeff Cody wrote:
> Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion
> checks for when qemu_mutex() functions are called without the
> corresponding qemu_mutex_init() having initialized the mutex.
>
> This uncovered a latent bug in qemu's nfs driver -
On 08/03/2017 11:02 AM, Kevin Wolf wrote:
> This is the first part of some fixes to bdrv_reopen(), which seems
> reasonable enough to merge for 2.10.
>
> There is much more wrong with bdrv_reopen() currently, especially with
> respect to op blocker permissions (basically the required
On Mon, Aug 07, 2017 at 03:30:07PM -0500, Eric Blake wrote:
> qcow2_co_pwritev_compressed() should not call bdrv_truncate()
> if determining the size failed.
>
> Reported-by: Markus Armbruster
> Signed-off-by: Eric Blake
Reviewed-by: Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote:
> This also requires changing the return type of get_cluster_offset()
> and adjusting all callers.
>
> Use osdep.h macros instead of open-coded rounding while in the
> area.
>
> Reported-by: Markus Armbruster
>
On Mon, Aug 07, 2017 at 03:30:06PM -0500, Eric Blake wrote:
> It's been #if 0'd since its introduction in 2006, commit 585f8587.
> We can revive dead code if we need it, but in the meantime, it has
> bit-rotted (for example, not checking for failure in bdrv_getlength()).
>
> Signed-off-by: Eric
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote:
> This also requires changing the return type of get_cluster_offset()
> and adjusting all callers.
>
> Use osdep.h macros instead of open-coded rounding while in the
> area.
>
> Reported-by: Markus Armbruster
>
On Mon, Aug 07, 2017 at 03:30:04PM -0500, Eric Blake wrote:
> vpc_open() was checking for bdrv_getlength() failure in one, but
> not the other, location.
>
> Reported-by: Markus Armbruster
> Signed-off-by: Eric Blake
> ---
> block/vpc.c | 9 -
> 1
On 08/07/2017 04:30 PM, Eric Blake wrote:
> Thanks again to Markus for catching these spots.
>
> Eric Blake (4):
> vpc: Check failure of bdrv_getlength()
> qcow: Check failure of bdrv_getlength() and bdrv_truncate()
> qcow2: Drop debugging dump_refcounts()
> qcow2: Check failure of
Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion
checks for when qemu_mutex() functions are called without the
corresponding qemu_mutex_init() having initialized the mutex.
This uncovered a latent bug in qemu's nfs driver - in
nfs_client_close(), the NFSClient structure is
On 08/07/2017 11:15 AM, Alberto Garcia wrote:
> Both the throttling limits set with the throttling.iops-* and
> throttling.bps-* options and their QMP equivalents defined in the
> BlockIOThrottle struct are integer values.
>
> Those limits are also reported in the BlockDeviceInfo struct and they
On 08/07/2017 05:30 PM, Eric Blake wrote:
This also requires changing the return type of get_cluster_offset()
and adjusting all callers.
Use osdep.h macros instead of open-coded rounding while in the
area.
Reported-by: Markus Armbruster
Signed-off-by: Eric Blake
On 08/07/2017 05:30 PM, Eric Blake wrote:
qcow2_co_pwritev_compressed() should not call bdrv_truncate()
if determining the size failed.
Reported-by: Markus Armbruster
Signed-off-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
On 08/07/2017 05:30 PM, Eric Blake wrote:
It's been #if 0'd since its introduction in 2006, commit 585f8587.
We can revive dead code if we need it, but in the meantime, it has
bit-rotted (for example, not checking for failure in bdrv_getlength()).
Signed-off-by: Eric Blake
On 08/07/2017 05:30 PM, Eric Blake wrote:
vpc_open() was checking for bdrv_getlength() failure in one, but
not the other, location.
Reported-by: Markus Armbruster
Signed-off-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
It's been #if 0'd since its introduction in 2006, commit 585f8587.
We can revive dead code if we need it, but in the meantime, it has
bit-rotted (for example, not checking for failure in bdrv_getlength()).
Signed-off-by: Eric Blake
---
block/qcow2.c | 21 -
Thanks again to Markus for catching these spots.
Eric Blake (4):
vpc: Check failure of bdrv_getlength()
qcow: Check failure of bdrv_getlength() and bdrv_truncate()
qcow2: Drop debugging dump_refcounts()
qcow2: Check failure of bdrv_getlength()
block/qcow.c | 64
vpc_open() was checking for bdrv_getlength() failure in one, but
not the other, location.
Reported-by: Markus Armbruster
Signed-off-by: Eric Blake
---
block/vpc.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/block/vpc.c
qcow2_co_pwritev_compressed() should not call bdrv_truncate()
if determining the size failed.
Reported-by: Markus Armbruster
Signed-off-by: Eric Blake
---
block/qcow2.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.c
This also requires changing the return type of get_cluster_offset()
and adjusting all callers.
Use osdep.h macros instead of open-coded rounding while in the
area.
Reported-by: Markus Armbruster
Signed-off-by: Eric Blake
---
block/qcow.c | 64
On 08/04/2017 10:32 AM, Eric Blake wrote:
> On 08/04/2017 07:45 AM, Markus Armbruster wrote:
>> Markus Armbruster writes:
>>
>>> bdrv_getlength() can fail. The uses in qcow.c don't check. Is that
>>> safe?
>>
>> There's another one in qcow2_co_pwritev_compressed().
>>
>> Yet
Markus Armbruster wrote:
> Sizes should use QAPI type 'size' (uint64_t). XBZRLECacheStats member
> @bytes is 'int' (int64_t). save_xbzrle_page() computes the byte count
> increment in size_t, implicitly converts it to int, then adds that to
> @bytes.
>
> Change the
07.08.2017 18:57, Vladimir Sementsov-Ogievskiy wrote:
07.08.2017 18:46, Vladimir Sementsov-Ogievskiy wrote:
07.08.2017 17:29, Eric Blake wrote:
On 08/07/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote:
185 iotest is broken.
How to test:
i=0; while ./check -qcow2 -nocache 185; do ((i+=1));
On 08/07/2017 11:09 AM, Vladimir Sementsov-Ogievskiy wrote:
> On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Set reply.handle to 0 on error path to prevent normal path of
>> nbd_co_receive_reply.
>>
>> The client still tried to send a flush request to the server, when
Markus Armbruster wrote:
> Sizes should use QAPI type 'size' (uint64_t). migrate-set-cache-size
> parameter @value is 'int' (int64_t). qmp_migrate_set_cache_size()
> ensures it fits into size_t. page_cache.c implicitly converts the
> signed size to unsigned types (it can't
Both the throttling limits set with the throttling.iops-* and
throttling.bps-* options and their QMP equivalents defined in the
BlockIOThrottle struct are integer values.
Those limits are also reported in the BlockDeviceInfo struct and they
are integers there as well.
Therefore there's no reason
Am 04.08.2017 um 17:10 hat Denis V. Lunev geschrieben:
> These cases were reported by Markus Armbruster
> Patches add error checking of the bdrv_getlength() call or remove
> the call of that function.
Thanks, applied to the block branch.
Kevin
07.08.2017 18:33, Eric Blake wrote:
On 08/07/2017 10:13 AM, Eric Blake wrote:
On 08/07/2017 07:56 AM, Vladimir Sementsov-Ogievskiy wrote:
07.08.2017 14:52, Eric Blake wrote:
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote:
Set reply.handle to 0 on error path to prevent normal path
07.08.2017 18:46, Vladimir Sementsov-Ogievskiy wrote:
07.08.2017 17:29, Eric Blake wrote:
On 08/07/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote:
185 iotest is broken.
How to test:
i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \
done; echo N = $i
finished for me
Am 07.08.2017 um 16:16 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 185 iotest is broken.
>
> How to test:
> > i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \
> done; echo N = $i
>
> finished for me like this:
>
> 185 2s ... - output mismatch (see 185.out.bad)
> ---
07.08.2017 17:29, Eric Blake wrote:
On 08/07/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote:
185 iotest is broken.
How to test:
i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \
done; echo N = $i
finished for me like this:
185 2s ... - output mismatch (see
Am 04.08.2017 um 16:09 hat Fam Zheng geschrieben:
> Errors from the callees must be captured and propagated to our caller,
> ensure this for both find_extent() and bdrv_getlength().
>
> Reported-by: Markus Armbruster
> Signed-off-by: Fam Zheng
Thanks,
On 08/07/2017 10:13 AM, Eric Blake wrote:
> On 08/07/2017 07:56 AM, Vladimir Sementsov-Ogievskiy wrote:
>> 07.08.2017 14:52, Eric Blake wrote:
>>> On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote:
Set reply.handle to 0 on error path to prevent normal path of
On 08/07/2017 07:56 AM, Vladimir Sementsov-Ogievskiy wrote:
> 07.08.2017 14:52, Eric Blake wrote:
>> On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Set reply.handle to 0 on error path to prevent normal path of
>>> nbd_co_receive_reply.
Side note: in general, our server must allow
On Mon, Aug 07, 2017 at 04:46:00PM +0200, Markus Armbruster wrote:
> Byte offsets should use QAPI type 'size' (uint64_t).
> QCryptoBlockInfoLUKS member @payload-offset and
> QCryptoBlockInfoLUKSSlot member @key-offset are 'int' (int64_t).
> qcrypto_block_luks_get_info() gets the former
File offsets, sizes and alignments should use QAPI type 'size'
(uint64_t). blockdev-add parameters are 'int' (int64_t):
BlockdevOptionsNull member @size; BlockdevOptionsQcow2 members
@cache-size, @l2-cache-size, @refcount-cache-size; BlockdevOptionsNfs
members @readahead-size, @page-cache-size;
nfs_client_open() implicitly converts the uint64_t value of
qemu_opt_get_number() to int64_t, then clamps it to range. The
clamping is broken for negative values.
Fix by making NFSClient members @readahead and @pagecache uint64_t.
Signed-off-by: Markus Armbruster
---
File offsets and sizes use QAPI type 'size' (uint64_t). MapEntry
members @start, @length and @offset are 'int' (int64_t).
get_block_status() sets @start and @length to unsigned long long
values, and @offset to a non-negative int64_t value.
Change these MapEntry members to 'size'.
"qemu-img map"
stream_start() takes int64_t speed. The underlying BlockJob
abstraction takes uint64_t. stream_start() converts from int64_t to
uint64_t, rejecting negative speed.
Lift this check and conversion out of stream_start() into its caller.
I'm going to lift it further until it falls off the top.
Byte offsets should use QAPI type 'size' (uint64_t).
QCryptoBlockInfoLUKS member @payload-offset and
QCryptoBlockInfoLUKSSlot member @key-offset are 'int' (int64_t).
qcrypto_block_luks_get_info() gets the former QCryptoBlock member
@payload_offset, implicitly converting from uint64_t, and computes
The nfs block driver uses QEMU_OPT_NUMBER for these sizes. All other
block drivers use QEMU_OPT_SIZE. Both are uint64_t, but QEMU_OPT_SIZE
rejects negative numbers, while QEMU_OPT_NUMBER interprets them modulo
2^64. Switch the nfs block driver to QEMU_OPT_SIZE.
Signed-off-by: Markus Armbruster
File offsets should use QAPI type 'size' (uint64_t). ImageCheck
member @image-end-offset is 'int' (int64_t). collect_image_check()
gets it from BdrvCheckResult member @image_end_offset (also int64_t,
should never be negative).
Change the ImageCheck member to 'size', for QAPI/QMP consistency.
mirror_start_job() takes int64_t speed. The underlying BlockJob
abstraction takes uint64_t. mirror_start_job() converts from int64_t
to uint64_t, rejecting negative speed.
Lift this check and conversion out of mirror_start_job() into its
callers. I'm going to lift it further until it falls off
Byte rates should use QAPI type 'size' (uint64_t). drive-backup,
blockdev-backup, block-commit, drive-mirror, blockdev-mirror,
block-stream and block-job-set-speed parameter @size is 'int'
(int64_t). Their QMP command handlers all ensure it's non-negative
before they pass it on to the next lower
File offsets should use QAPI type 'size' (uint64_t). BlockJobInfo
members @len, offset and parameters @len, @offset of events
BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are 'int'
(int64_t). block_job_query(), block_job_event_completed(),
block_job_event_cancelled(),
backup_job_create() takes int64_t speed. The underlying BlockJob
abstraction takes uint64_t. backup_job_create() converts from int64_t
to uint64_t, rejecting negative speed.
Lift this check and conversion out of backup_job_create() into its
callers. I'm going to lift it further until it falls
Sizes and byte rates should use QAPI type 'size' (uint64_t).
BlockIOThrottle and BlockDeviceInfo members @bps, @bps_rd, @bps_wr,
@bps_max, @bps_rd_max, @bps_wr_max, @iops_size are 'int' (int64_t).
qmp_block_set_io_throttle() and bdrv_block_device_info() copy @bps,
@bps_rd, @bps_wr to / from
Byte counts and file offsets should use QAPI type 'size' (uint64_t).
BlockDeviceStats members @rd_bytes, @wr_bytes and @wr_highest_offset
are 'int' (int64_t). bdrv_query_blk_stats() gets them from
BlockAcctStats member nr_bytes[] and stat64_get(), implicitly
converting from uint64_t.
Change all
Signed-off-by: Markus Armbruster
---
qemu-img.c | 4
1 file changed, 4 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index 3ae5fe3..cf3ef3e 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2838,6 +2838,10 @@ static int img_map(int argc, char **argv)
}
length
blockdev_mirror_common() takes int64_t speed. The underlying BlockJob
abstraction takes uint64_t. blockdev_mirror_common() converts from
int64_t to uint64_t, rejecting negative speed.
Lift this check and conversion out of blockdev_mirror_common() into
its callers. I'm going to lift it further
The previous commit made them unsigned in QMP. Switch HMP's args_type
from 'l' to 'o'. Loses support for expressions (QEMU pocket
calculator), gains support for unit suffixes. Negative values are no
longer accepted and interpreted modulo 2^64. Instead, values between
2^63 and 2^64-1 are now
qmp_migrate_set_cache_size() calls xbzrle_cache_resize() to do the
actual work, which in turn calls cache_init() to resize the cache. If
cache_init() fails, xbzrle_cache_resize() reports that error with
error_report() and fails. qmp_migrate_set_cache_size() detects the
failure and reports
Sizes should use QAPI type 'size' (uint64_t). block_resize parameter
@size is 'int' (int64_t). qmp_block_resize() ensures it's
non-negative before it passes it on to blk_truncate().
Change parameter @size to 'size', and update the range check
accordingly. Just cleanup; block_resize accepts the
Byte counts should use QAPI type 'size' (uint64_t). Parameter
@buf-size of drive-mirror and blockdev-mirror is 'int' (int64_t). The
underlying MirrorBlockJob abstraction takes size_t.
mirror_start_job() converts from int64_t to size_t, rejecting negative
sizes (but not values exceeding
align_offset() mixes different widths, and its callers pass both
signed and unsigned values. It's best to stick to unsigned when
twiddling bits.
Signed-off-by: Markus Armbruster
---
block/qcow2.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
block_job_create() takes int64_t speed. The underlying RateLimit
abstraction takes uint64_t. block_job_create() converts from int64_t
to uint64_t, rejecting negative speed.
Lift this check and conversion out of block_job_create() into its
callers. I'm going to lift it further until it falls
mirror_start() takes int64_t speed. The underlying BlockJob
abstraction takes uint64_t. mirror_start() converts from int64_t to
uint64_t, rejecting negative speed.
Lift this check and conversion out of mirror_start() into its caller.
I'm going to lift it further until it falls off the top.
File offsets should use QAPI type 'size' (uint64_t).
BLOCK_IMAGE_CORRUPTED parameters @offset and @size are 'int'
(int64_t). qcow2_signal_corruption() passes non-negative int64_t
values.
Change the event parameters to 'size', for QAPI/QMP consistency.
Signed-off-by: Markus Armbruster
Byte rates should use QAPI type 'size' (uint64_t). BlockJobInfo
member @speed and parameter @speed of events BLOCK_JOB_COMPLETED,
BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are 'int' (int64_t).
block_job_query(), block_job_event_completed(),
block_job_event_cancelled(), block_job_event_ready() all get
File offsets should use QAPI type 'size' (uint64_t).
block-set-write-threshold parameter @write-threshold is 'int'
(int64_t). qmp_block_set_write_threshold() passes it on to
bdrv_write_threshold_set(), implicitly converting to uint64_t.
BLOCK_WRITE_THRESHOLD parameters @write-threshold,
Parameter @val is int64_t. It's assigned to opt->value.uint, which is
uint64_t, because that's what QemuOpts integers are. Screwed up when
the function was added in commit b83c18e. Change @val to uint64_t.
Signed-off-by: Markus Armbruster
---
include/qemu/option.h | 2 +-
The BlockJob abstraction takes int64_t speed. The underlying
RateLimit abstraction takes uint64_t. We convert from int64_t to
uint64_t in the BlockJobDriver speed_set() methods. They all reject
negative speed.
Lift this check and conversion up into the method's caller
block_job_set_speed().
qemu_chr_parse_ringbuf() initializes the new ChardevRingbuf's @size to
the value of qemu_opt_get_size(). Except it first truncates the value
from uint64_t to int. Fix that, so you can waste your RAM on
multi-gigabyte ring buffers.
Signed-off-by: Markus Armbruster
---
The previous commit made it unsigned in QMP. Switch HMP's args_type
from 'M' to 'o'. Loses support for expressions (QEMU pocket
calculator), gains support for units other than mebibytes. Negative
values are no longer accepted and interpreted modulo 2^64. Instead,
values between 2^63 and 2^64-1
Sizes should use QAPI type 'size' (uint64_t). SnapshotInfo member
@vm-state-size is 'int' (int64_t). QEMUSnapshotInfo member
@vm_state_size is uint64_t. bdrv_query_snapshot_info_list(),
bdrv_image_info_dump(), qmp_blockdev_snapshot_delete_internal_sync()
convert implicitly between the two.
Block dirty bitmaps represent granularity in bytes as uint32_t. It
must be a power of two and a multiple of BDRV_SECTOR_SIZE.
The trouble with uint32_t is computations like this one in
mirror_do_read():
uint64_t max_bytes;
max_bytes = s->granularity * s->max_iov;
The operands of * are
Sizes and addresses should use QAPI type 'size' (uint64_t).
PCDIMMDeviceInfo members @addr and @size are 'int' (int64_t).
qmp_pc_dimm_device_list() implicitly converts from uint64_t.
Change these PCDIMMDeviceInfo members to 'size'.
query-memory-devices now reports sizes and addresses above
hbitmap_count() returns uint64_t.
Clean up test-hbitmap.c to check its value with g_assert_cmpuint()
instead of g_assert_cmpint().
bdrv_get_dirty_count() and bdrv_get_meta_dirty_count() return its
value converted to int64_t. Clean them up to return it unadulterated.
This moves the implicit
Sizes should use QAPI type 'size' (uint64_t). BlockMeasureInfo
members @required and @fully-allocated are 'int' (int64_t).
qcow2_measure() computes their values from qcow2_calc_prealloc_size(),
@virtual_size and @required, all uint64_t (the former only since the
previous commit).
raw_measure()
Sizes should use QAPI type 'size' (uint64_t). migrate-set-cache-size
parameter @value is 'int' (int64_t). qmp_migrate_set_cache_size()
ensures it fits into size_t. page_cache.c implicitly converts the
signed size to unsigned types (it can't quite decide whether to use
uint64_t or size_t for
Byte counts should use QAPI type 'size' (uint64_t). BlockDirtyInfo
member @count is 'int' (int64_t). bdrv_query_dirty_bitmaps() computes
@count from bdrv_get_dirty_count() in uint64_t, then implicitly
converts to int64_t. Before the commit before previous, the
conversion was in
get_human_readable_size() formats all negative numbers as if they were
small.
The previous two commits changed all callers to pass unsigned
arguments. Change the parameter type to from int64_t to uint64_t.
Also change the buffer size parameter from int (ahem!) to size_t.
Signed-off-by: Markus
Signed-off-by: Markus Armbruster
---
block/backup.c | 2 +-
block/commit.c | 2 +-
block/mirror.c | 2 +-
block/stream.c | 2 +-
blockjob.c | 9 +
include/block/blockjob_int.h | 2 +-
6 files
Sizes, virtual and physical addresses should use QAPI type 'size'
(uint64_t). dump-guest-memory parameters @begin, @length are 'int'
(int64_t). They get implicitly converted to unsigned types somewhere
down in the bowels of the dump machinery. DumpQueryResult members
@completed and @total are
Byte rates should use QAPI type 'size' (uint64_t).
migrate_set_speed's parameter @value and member @max-bandwidth of
MigrationParameters and MigrateSetParameters are 'int' (int64_t).
Change them all to 'size'.
migrate_set_speed and migrate-set-parameters now accept bandwidth
values between 2^63
Sizes, virtual and physical addresses should use QAPI type 'size'
(uint64_t). memsave, pmemsave parameters @val, @size are 'int'
(int64_t). qmp_memsave() and qmp_pmemsave() implicitly convert to
target_ulong or hwaddr.
Change the parameters to 'size'.
Both commands now accept size and address
The previous commit switched balloon from 'M' to 'o', rendering 'M'
unused. It was never used for anything else. Drop it.
Signed-off-by: Markus Armbruster
---
monitor.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/monitor.c b/monitor.c
@size is declared int64_t. It's set in two places.
The second one assigns the (signed) value of bdrv_getlength(), then
errors out if its negative.
The first one assigns qemu_opt_get_size(opts, BLOCK_OPT_SIZE, 0),
i.e. an uint64_t value. What if it exceeds INT64_MAX? Is that even
possible?
Signed-off-by: Markus Armbruster
---
qobject/qdict.c | 68 -
qobject/qlist.c | 2 +-
2 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/qobject/qdict.c b/qobject/qdict.c
index 576018e..d795079 100644
---
Signed-off-by: Markus Armbruster
---
monitor.c | 75 +++
1 file changed, 47 insertions(+), 28 deletions(-)
diff --git a/monitor.c b/monitor.c
index e0f8801..8b54ba1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -85,37
Sizes should use QAPI type 'size' (uint64_t). XBZRLECacheStats member
@bytes is 'int' (int64_t). save_xbzrle_page() computes the byte count
increment in size_t, implicitly converts it to int, then adds that to
@bytes.
Change the XBZRLECacheStats member to 'size' and clean up
save_xbzrle_page().
Signed-off-by: Markus Armbruster
---
include/qapi/qmp/qdict.h | 5 +
qobject/qdict.c | 43 ---
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index
Sizes should use QAPI type 'size' (uint64_t). ringbuf-read parameter
@size is 'int' (int64_t). qmp_ringbuf_read() rejects negative values,
then implicitly converts to size_t.
Change the parameter to 'size' and drop the check for negative values.
ringbuf-read now accepts size values between
Sizes should use QAPI type 'size' (uint64_t). MigrationStats members
@transferred, @remaining, @total, @normal-bytes, @page-size are 'int'
(int64_t). populate_ram_info(), populate_disk_info() and and many
places that update them in global variable @ram_counters implicitly
convert from unsigned
Sizes should use QAPI type 'size' (uint64_t). ChardevRingbuf member
@size is 'int' (int64_t). Doesn't really matter, as its users
chardev-add and chardev-change manually reject sizes that aren't
powers of two.
Change the ChardevRingbuf member to 'size' anyway.
Signed-off-by: Markus Armbruster
Byte sizes, offsets and the like should use QAPI type 'size'
(uint64_t). This rule is more honored in the breach than in the
observance. Fix the obvious offenders.
The series is RFC for at least two reasons:
1. It's only lightly tested. Commit message claims like "FOO now
works" haven't
On 08/07/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote:
> 185 iotest is broken.
>
> How to test:
>> i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \
> done; echo N = $i
>
> finished for me like this:
>
> 185 2s ... - output mismatch (see 185.out.bad)
> ---
185 iotest is broken.
How to test:
> i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \
done; echo N = $i
finished for me like this:
185 2s ... - output mismatch (see 185.out.bad)
--- /work/src/qemu/master/tests/qemu-iotests/185.out2017-07-14 \
15:14:29.520343805
On Mon, Aug 7, 2017 at 9:38 AM, Jeff Cody wrote:
> VHDX uses uint64_t types for most offsets, following the VHDX spec.
> However, bdrv_truncate() takes an int64_t value for the truncating
> offset. Check for overflow before calling bdrv_truncate().
>
> While we are here,
Am 04.08.2017 um 17:26 hat Paolo Bonzini geschrieben:
> This is not used anymore since c01c214b69 ("block: remove all encryption
> handling APIs", 2017-07-11).
>
> Signed-off-by: Paolo Bonzini
Thanks, applied to the block branch.
Kevin
Am 07.08.2017 um 14:38 hat Jeff Cody geschrieben:
>
> Some VHDX bug fixes, including:
>
> 1. Checking bdrv_getlength(), bdrv_flush(), and bdrv_truncate() return values
Thanks, applied to the block branch.
Kevin
Am 07.08.2017 um 14:36 hat Alberto Garcia geschrieben:
> The QUORUM_REPORT_BAD event has fields to report the sector in which
> the error was detected and the number of affected sectors starting
> from that one. This is important for read and write errors, but not
> for flush errors.
>
> For
07.08.2017 14:55, Eric Blake wrote:
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote:
We set s->reply.handle to 0 on one error path and don't set on another.
For consistancy and to avoid assert in nbd_read_reply_entry let's
set s->reply.handle to 0 in case of wrong handle too.
07.08.2017 14:52, Eric Blake wrote:
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote:
Set reply.handle to 0 on error path to prevent normal path of
nbd_co_receive_reply.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/nbd-client.c | 1 +
1 file
On 08/07/2017 07:38 AM, Jeff Cody wrote:
> Signed-off-by: Jeff Cody
> ---
> block/vhdx-log.c | 6 +-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake
> diff --git a/block/vhdx-log.c b/block/vhdx-log.c
> index a27dc05..14b724e
On 08/07/2017 07:38 AM, Jeff Cody wrote:
> Reported-by: Kevin Wolf
> Signed-off-by: Jeff Cody
> ---
> block/vhdx-log.c | 17 ++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
Reviewed-by: Eric Blake
--
Eric Blake,
On 08/07/2017 07:36 AM, Alberto Garcia wrote:
> The QUORUM_REPORT_BAD event has fields to report the sector in which
> the error was detected and the number of affected sectors starting
> from that one. This is important for read and write errors, but not
> for flush errors.
>
> For flush errors
1 - 100 of 128 matches
Mail list logo