qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 95667c: nvme: Set number of queues later in n


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 95667c: nvme: Set number of queues later in nvme_init()
Date: Mon, 15 Jul 2019 08:56:23 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 95667c3be0c9f5fc62f58fe845879250f63f7d32
      
https://github.com/qemu/qemu/commit/95667c3be0c9f5fc62f58fe845879250f63f7d32
  Author: Michal Privoznik <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block/nvme.c

  Log Message:
  -----------
  nvme: Set number of queues later in nvme_init()

When creating the admin queue in nvme_init() the variable that
holds the number of queues created is modified before actual
queue creation. This is a problem because if creating the queue
fails then the variable is left in inconsistent state. This was
actually observed when I tried to hotplug a nvme disk. The
control got to nvme_file_open() which called nvme_init() which
failed and thus nvme_close() was called which in turn called
nvme_free_queue_pair() with queue being NULL. This lead to an
instant crash:

  #0  0x000055d9507ec211 in nvme_free_queue_pair (bs=0x55d952ddb880, q=0x0) at 
block/nvme.c:164
  #1  0x000055d9507ee180 in nvme_close (bs=0x55d952ddb880) at block/nvme.c:729
  #2  0x000055d9507ee3d5 in nvme_file_open (bs=0x55d952ddb880, 
options=0x55d952bb1410, flags=147456, errp=0x7ffd8e19e200) at block/nvme.c:781
  #3  0x000055d9507629f3 in bdrv_open_driver (bs=0x55d952ddb880, 
drv=0x55d95109c1e0 <bdrv_nvme>, node_name=0x0, options=0x55d952bb1410, 
open_flags=147456, errp=0x7ffd8e19e310) at block.c:1291
  #4  0x000055d9507633d6 in bdrv_open_common (bs=0x55d952ddb880, file=0x0, 
options=0x55d952bb1410, errp=0x7ffd8e19e310) at block.c:1551
  #5  0x000055d950766881 in bdrv_open_inherit (filename=0x0, reference=0x0, 
options=0x55d952bb1410, flags=32768, parent=0x55d9538ce420, 
child_role=0x55d950eaade0 <child_file>, errp=0x7ffd8e19e510) at block.c:3063
  #6  0x000055d950765ae4 in bdrv_open_child_bs (filename=0x0, 
options=0x55d9541cdff0, bdref_key=0x55d950af33aa "file", parent=0x55d9538ce420, 
child_role=0x55d950eaade0 <child_file>, allow_none=true, errp=0x7ffd8e19e510) 
at block.c:2712
  #7  0x000055d950766633 in bdrv_open_inherit (filename=0x0, reference=0x0, 
options=0x55d9541cdff0, flags=0, parent=0x0, child_role=0x0, 
errp=0x7ffd8e19e908) at block.c:3011
  #8  0x000055d950766dba in bdrv_open (filename=0x0, reference=0x0, 
options=0x55d953d00390, flags=0, errp=0x7ffd8e19e908) at block.c:3156
  #9  0x000055d9507cb635 in blk_new_open (filename=0x0, reference=0x0, 
options=0x55d953d00390, flags=0, errp=0x7ffd8e19e908) at 
block/block-backend.c:389
  #10 0x000055d950465ec5 in blockdev_init (file=0x0, bs_opts=0x55d953d00390, 
errp=0x7ffd8e19e908) at blockdev.c:602

Signed-off-by: Michal Privoznik <address@hidden>
Message-id: address@hidden
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Maxim Levitsky <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: e5182c1c57ac9aa0e9c399b9c60af3c41cff35b4
      
https://github.com/qemu/qemu/commit/e5182c1c57ac9aa0e9c399b9c60af3c41cff35b4
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block.c
    M block/commit.c
    M block/mirror.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Add BDS.never_freeze

The commit and the mirror block job must be able to drop their filter
node at any point.  However, this will not be possible if any of the
BdrvChild links to them is frozen.  Therefore, we need to prevent them
from ever becoming frozen.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Andrey Shinkevich <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 17a7c39248fc629469d6f66c6122db841b736bc7
      
https://github.com/qemu/qemu/commit/17a7c39248fc629469d6f66c6122db841b736bc7
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block/stream.c

  Log Message:
  -----------
  block/stream: Fix error path

As of commit c624b015bf14fe01f1e6452a36e63b3ea1ae4998, the stream job
only freezes the chain until the overlay of the base node.  The error
path must consider this.

Fixes: c624b015bf14fe01f1e6452a36e63b3ea1ae4998
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 8441d82d51e25c6a7d1ca92cecc42168f20af72a
      
https://github.com/qemu/qemu/commit/8441d82d51e25c6a7d1ca92cecc42168f20af72a
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block/stream.c

  Log Message:
  -----------
  block/stream: Swap backing file change order

bdrv_change_backing_file() can result in yields.  Therefore, @base may
no longer be the the backing_bs() of s->bottom afterwards.

Just swap the order of the two calls to fix this.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 3cf746b3f16e81b306d732262f4c16bc7707c0ce
      
https://github.com/qemu/qemu/commit/3cf746b3f16e81b306d732262f4c16bc7707c0ce
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Deep-clear inherits_from

BDS.inherits_from does not always point to an immediate parent node.
When launching a block job with a filter node, for example, the node
directly below the filter will not point to the filter, but keep its old
pointee (above the filter).

If that pointee goes away while the job is still running, the node's
inherits_from will not be updated and thus point to garbage.  To fix
this, bdrv_unref_child() has to check not only the parent node's
immediate children for nodes whose inherits_from needs to be cleared,
but its whole subtree.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 7229e121fd3e299192b03f1a9b59c946e20ed627
      
https://github.com/qemu/qemu/commit/7229e121fd3e299192b03f1a9b59c946e20ed627
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M tests/qemu-iotests/030

  Log Message:
  -----------
  iotests: Fix throttling in 030

Currently, TestParallelOps in 030 creates images that are too small for
job throttling to be effective.  This is reflected by the fact that it
never undoes the throttling.

Increase the image size and undo the throttling when the job should be
completed.  Also, add throttling in test_overlapping_4, or the jobs may
not be so overlapping after all.  In fact, the error usually emitted
here is that node2 simply does not exist, not that overlapping jobs are
not allowed -- the fact that this job ignores the exact error messages
and just checks the error class is something that should be fixed in a
follow-up patch.

Signed-off-by: Max Reitz <address@hidden>
Tested-by: Andrey Shinkevich <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 3f92d54c00ad707cb43c027a5dfc2a68510176f9
      
https://github.com/qemu/qemu/commit/3f92d54c00ad707cb43c027a5dfc2a68510176f9
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M tests/qemu-iotests/030

  Log Message:
  -----------
  iotests: Compare error messages in 030

Currently, 030 just compares the error class, which does not say
anything.

Before HEAD^ added throttling to test_overlapping_4, that test actually
usually failed because node2 was already gone, not because it was the
commit and stream job were not allowed to overlap.

Prevent such problems in the future by comparing the error description
instead.

Signed-off-by: Max Reitz <address@hidden>
Tested-by: Andrey Shinkevich <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 15427f63bccfaa0735612c30dcbc08e1f8deb17d
      
https://github.com/qemu/qemu/commit/15427f63bccfaa0735612c30dcbc08e1f8deb17d
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: Add @use_log to VM.run_job()

unittest-style tests generally do not use the log file, but VM.run_job()
can still be useful to them.  Add a parameter to it that hides its
output from the log file.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 13658cd70bf0dd7c39b103aedc94d43371278226
      
https://github.com/qemu/qemu/commit/13658cd70bf0dd7c39b103aedc94d43371278226
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M tests/qemu-iotests/030
    M tests/qemu-iotests/030.out

  Log Message:
  -----------
  iotests: Add new case to 030

We recently removed the dependency of the stream job on its base node.
That makes it OK to use a commit filter node there.  Test that.

Signed-off-by: Max Reitz <address@hidden>
Tested-by: Andrey Shinkevich <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 0e4a0644bf18b6aab136f926b0e63bc24db6bdfe
      
https://github.com/qemu/qemu/commit/0e4a0644bf18b6aab136f926b0e63bc24db6bdfe
  Author: Max Reitz <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M tests/qemu-iotests/030
    M tests/qemu-iotests/030.out

  Log Message:
  -----------
  iotests: Add read-only test case to 030

This tests that the stream job exits cleanly (without abort) when the
top node is read-only and cannot be reopened read/write.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 0b1847bbc2b4f50e7497cb05c4540bf7b016c9c6
      
https://github.com/qemu/qemu/commit/0b1847bbc2b4f50e7497cb05c4540bf7b016c9c6
  Author: Stefano Garzarella <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block/gluster.c

  Log Message:
  -----------
  gluster: fix .bdrv_reopen_prepare when backing file is a JSON object

When the backing_file is specified as a JSON object, the
qemu_gluster_reopen_prepare() fails with this message:
    invalid URI json:{"server.0.host": ...}

In this case, we should call qemu_gluster_init() using the QDict
'state->options' that contains the JSON parameters already parsed.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1542445
Signed-off-by: Stefano Garzarella <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 5ea8ec2fcf57cb9af24ad2cf17b4d64adb03afdf
      
https://github.com/qemu/qemu/commit/5ea8ec2fcf57cb9af24ad2cf17b4d64adb03afdf
  Author: Peter Maydell <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block.c
    M block/commit.c
    M block/gluster.c
    M block/mirror.c
    M block/nvme.c
    M block/stream.c
    M include/block/block_int.h
    M tests/qemu-iotests/030
    M tests/qemu-iotests/030.out
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-15' 
into staging

Block patches for 4.1-rc1:
- Fixes for the NVMe block driver, the gluster block driver, and for
  running multiple block jobs concurrently on a single chain

# gpg: Signature made Mon 15 Jul 2019 14:51:43 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Max Reitz <address@hidden>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2019-07-15:
  gluster: fix .bdrv_reopen_prepare when backing file is a JSON object
  iotests: Add read-only test case to 030
  iotests: Add new case to 030
  iotests: Add @use_log to VM.run_job()
  iotests: Compare error messages in 030
  iotests: Fix throttling in 030
  block: Deep-clear inherits_from
  block/stream: Swap backing file change order
  block/stream: Fix error path
  block: Add BDS.never_freeze
  nvme: Set number of queues later in nvme_init()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/a68725f930a0...5ea8ec2fcf57



reply via email to

[Prev in Thread] Current Thread [Next in Thread]