[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PULL 08/23] file-posix: Forbid trying to
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen |
Date: |
Fri, 05 Oct 2018 15:40:09 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Fri 05 Oct 2018 02:55:13 PM CEST, Peter Maydell wrote:
>> + rs->check_cache_dropped =
>> + qemu_opt_get_bool_del(opts, "x-check-cache-dropped", false);
>> +
>> + /* This driver's reopen function doesn't currently allow changing
>> + * other options, so let's put them back in the original QDict and
>> + * bdrv_reopen_prepare() will detect changes and complain. */
>> + qemu_opts_to_qdict(opts, state->options);
>
> Hi. Coverity is suspicious about this call to qemu_opts_to_qdict()
> because it returns a value which this callsite is ignoring but almost
> all others don't ignore (CID 1395991). Is it correct?
It's a false positive because qemu_opts_to_qdict() returns the same
value that is passed (unless that value is NULL).
We can fix the warning by doing
state->options = qemu_opts_to_qdict(opts, state->options);
or by modifying qemu_opts_to_qdict() to get a QDict ** and return void.
Berto
- [Qemu-devel] [PULL 03/23] file-posix: x-check-cache-dropped should default to false on reopen, (continued)
- [Qemu-devel] [PULL 03/23] file-posix: x-check-cache-dropped should default to false on reopen, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 04/23] block: Remove child references from bs->{options, explicit_options}, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 06/23] block: Allow child references on reopen, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 07/23] block: Forbid trying to change unsupported options during reopen, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 05/23] block: Don't look for child references in append_open_options(), Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 10/23] block: Allow changing 'detect-zeroes' on reopen, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 09/23] block: Allow changing 'discard' on reopen, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 17/23] qcow2: Resize the cache upon image resizing, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 19/23] qcow2: Explicit number replaced by a constant, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 14/23] qcow2: Avoid duplication in setting the refcount cache size, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 18/23] qcow2: Set the default cache-clean-interval to 10 minutes, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 11/23] qcow2: Options' documentation fixes, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 20/23] block-backend: Set werror/rerror defaults in blk_new(), Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 13/23] qcow2: Make sizes more humanly readable, Kevin Wolf, 2018/10/01
- [Qemu-devel] [PULL 12/23] include: Add a lookup table of sizes, Kevin Wolf, 2018/10/01