diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-11-09 19:33:07 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-11-09 19:33:07 +0000 |
commit | 2b030ce1ed75e075d35b0d1008a0cacd73624b28 (patch) | |
tree | f339590f14578a646381692854e66a7f387c37dd /hw | |
parent | a2547c1ba911a0c53a10fe02d94a0f539dc064cc (diff) | |
parent | d669ed6ab028497d634e1f236c74a98725f9e45f (diff) | |
download | qemu-2b030ce1ed75e075d35b0d1008a0cacd73624b28.zip qemu-2b030ce1ed75e075d35b0d1008a0cacd73624b28.tar.gz qemu-2b030ce1ed75e075d35b0d1008a0cacd73624b28.tar.bz2 |
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-11-09-v2' into staging
Block patches for 5.2.0-rc1:
- Some nvme fixes (addressing problems spotted by Coverity)
- Fix nfs compiling on mingw (and enable it in Cirrus)
- Fix an error path in bdrv_co_invalidate_cache() (permission update
was initiated, but not aborted)
- Fix (on-error) roll back in bdrv_drop_intermediate(): Instead of
inlining bdrv_replace_node() (wrongly), call that function
- Fix for iotest 240
- Fix error handling in bdrv_getlength()
- Be more explicit about how QCowL2Meta objects are handled
- Cleanups
# gpg: Signature made Mon 09 Nov 2020 17:45:06 GMT
# gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg: issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* remotes/maxreitz/tags/pull-block-2020-11-09-v2:
block: make bdrv_drop_intermediate() less wrong
block: add bdrv_replace_node_common()
block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache()
block: Fix some code style problems, "foo* bar" should be "foo *bar"
block: Fix integer promotion error in bdrv_getlength()
block: enable libnfs on msys2/mingw in cirrus.yml
block: Fixes nfs compiling error on msys2/mingw
iotests: rewrite iotest 240 in python
iotests: add filter_qmp_virtio_scsi function
hw/block/nvme: fix free of array-typed value
hw/block/nvme: fix uint16_t use of uint32_t sgls member
hw/block/nvme: fix null ns in register namespace
qcow2: Document and enforce the QCowL2Meta invariants
block: Move bdrv_drain_all_end_quiesce() to block_int.h
block: Remove unused include
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nvme.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index fa2cba7..01b657b 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -452,7 +452,7 @@ static uint16_t nvme_map_sgl_data(NvmeCtrl *n, QEMUSGList *qsg, * segments and/or descriptors. The controller might accept * ignoring the rest of the SGL. */ - uint16_t sgls = le16_to_cpu(n->id_ctrl.sgls); + uint32_t sgls = le32_to_cpu(n->id_ctrl.sgls); if (sgls & NVME_CTRL_SGLS_EXCESS_LENGTH) { break; } @@ -2562,8 +2562,7 @@ int nvme_register_namespace(NvmeCtrl *n, NvmeNamespace *ns, Error **errp) if (!nsid) { for (int i = 1; i <= n->num_namespaces; i++) { - NvmeNamespace *ns = nvme_ns(n, i); - if (!ns) { + if (!nvme_ns(n, i)) { nsid = ns->params.nsid = i; break; } @@ -2800,7 +2799,6 @@ static void nvme_exit(PCIDevice *pci_dev) NvmeCtrl *n = NVME(pci_dev); nvme_clear_ctrl(n); - g_free(n->namespaces); g_free(n->cq); g_free(n->sq); g_free(n->aer_reqs); |