Skip to content
Snippets Groups Projects
  1. Mar 09, 2020
  2. Mar 08, 2020
  3. Mar 06, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 67f17e23
      Peter Maydell authored
      
      Block layer patches:
      
      - Add qemu-storage-daemon (still experimental)
      - rbd: Add support for ceph namespaces
      - Fix bdrv_reopen() with backing file in different AioContext
      - qcow2: Fix read-write reopen with persistent dirty bitmaps
      - qcow2: Fix alloc_cluster_abort() for pre-existing clusters
      
      # gpg: Signature made Fri 06 Mar 2020 17:12:31 GMT
      # gpg:                using RSA key 7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream: (29 commits)
        block: bdrv_reopen() with backing file in different AioContext
        iotests: Refactor blockdev-reopen test for iothreads
        block/rbd: Add support for ceph namespaces
        qemu-storage-daemon: Add --monitor option
        monitor: Add allow_hmp parameter to monitor_init()
        hmp: Fail gracefully if chardev is already in use
        qmp: Fail gracefully if chardev is already in use
        monitor: Create QAPIfied monitor_init()
        qapi: Create 'pragma' module
        stubs: Update monitor stubs for qemu-storage-daemon
        qemu-storage-daemon: Add --chardev option
        qemu-storage-daemon: Add main loop
        qemu-storage-daemon: Add --export option
        blockdev-nbd: Boxed argument type for nbd-server-add
        qemu-storage-daemon: Add --nbd-server option
        qemu-storage-daemon: Add --object option
        qapi: Flatten object-add
        qemu-storage-daemon: Add --blockdev option
        block: Move sysemu QMP commands to QAPI block module
        block: Move common QMP commands to block-core QAPI module
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      67f17e23
    • Kevin Wolf's avatar
      block: bdrv_reopen() with backing file in different AioContext · 1de6b45f
      Kevin Wolf authored
      
      This patch allows bdrv_reopen() (and therefore the x-blockdev-reopen QMP
      command) to attach a node as the new backing file even if the node is in
      a different AioContext than the parent if one of both nodes can be moved
      to the AioContext of the other node.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Tested-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Message-Id: <20200306141413.30705-3-kwolf@redhat.com>
      Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      1de6b45f
    • Kevin Wolf's avatar
      iotests: Refactor blockdev-reopen test for iothreads · 97518e11
      Kevin Wolf authored
      
      We'll want to test more than one successful case in the future, so
      prepare the test for that by a refactoring that runs each scenario in a
      separate VM.
      
      test_iothreads_switch_{backing,overlay} currently produce errors, but
      these are cases that should actually work, by switching either the
      backing file node or the overlay node to the AioContext of the other
      node.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Tested-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Message-Id: <20200306141413.30705-2-kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      97518e11
    • Florian Florensa's avatar
      block/rbd: Add support for ceph namespaces · 19ae9ae0
      Florian Florensa authored
      
      Starting from ceph Nautilus, RBD has support for namespaces, allowing
      for finer grain ACLs on images inside a pool, and tenant isolation.
      
      In the rbd cli tool documentation, the new image-spec and snap-spec are :
       - [pool-name/[namespace-name/]]image-name
       - [pool-name/[namespace-name/]]image-name@snap-name
      
      When using an non namespace's enabled qemu, it complains about not
      finding the image called namespace-name/image-name, thus we only need to
      parse the image once again to find if there is a '/' in its name, and if
      there is, use what is before it as the name of the namespace to later
      pass it to rados_ioctx_set_namespace.
      rados_ioctx_set_namespace if called with en empty string or a null
      pointer as the namespace parameters pretty much does nothing, as it then
      defaults to the default namespace.
      
      The namespace is extracted inside qemu_rbd_parse_filename, stored in the
      qdict, and used in qemu_rbd_connect to make it work with both qemu-img,
      and qemu itself.
      
      Signed-off-by: default avatarFlorian Florensa <fflorensa@online.net>
      Message-Id: <20200110111513.321728-2-fflorensa@online.net>
      Reviewed-by: default avatarJason Dillaman <dillaman@redhat.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      19ae9ae0
    • Kevin Wolf's avatar
      qemu-storage-daemon: Add --monitor option · 2af282ec
      Kevin Wolf authored
      
      This adds and parses the --monitor option, so that a QMP monitor can be
      used in the storage daemon. The monitor offers commands defined in the
      QAPI schema at storage-daemon/qapi/qapi-schema.json.
      
      The --monitor options currently allows to create multiple monitors with
      the same ID. This part of the interface is considered unstable. We will
      reject such configurations as soon as we have a design for the monitor
      subsystem to perform these checks. (In the system emulator, we depend on
      QemuOpts rejecting duplicate IDs.)
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-21-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      2af282ec
    • Kevin Wolf's avatar
      monitor: Add allow_hmp parameter to monitor_init() · a2f411c4
      Kevin Wolf authored
      
      Add a new parameter allow_hmp to monitor_init() so that the storage
      daemon can disable HMP.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-20-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      a2f411c4
    • Kevin Wolf's avatar
      hmp: Fail gracefully if chardev is already in use · 8e9119a8
      Kevin Wolf authored
      
      Trying to attach a HMP monitor to a chardev that is already in use
      results in a crash because monitor_init_hmp() passes &error_abort to
      qemu_chr_fe_init():
      
      $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo --mon foo
      QEMU 4.2.50 monitor - type 'help' for more information
      (qemu) Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220:
      qemu-system-x86_64: --mon foo: Device 'foo' is in use
      Abgebrochen (Speicherabzug geschrieben)
      
      Fix this by allowing monitor_init_hmp() to return an error and passing
      any error in qemu_chr_fe_init() to its caller instead of aborting.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-19-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8e9119a8
    • Kevin Wolf's avatar
      qmp: Fail gracefully if chardev is already in use · f27a9bb3
      Kevin Wolf authored
      
      Trying to attach a QMP monitor to a chardev that is already in use
      results in a crash because monitor_init_qmp() passes &error_abort to
      qemu_chr_fe_init():
      
      $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo,mode=control --mon foo,mode=control
      Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220:
      qemu-system-x86_64: --mon foo,mode=control: Device 'foo' is in use
      Abgebrochen (Speicherabzug geschrieben)
      
      Fix this by allowing monitor_init_qmp() to return an error and passing
      any error in qemu_chr_fe_init() to its caller instead of aborting.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-18-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      f27a9bb3
    • Kevin Wolf's avatar
      monitor: Create QAPIfied monitor_init() · f2098725
      Kevin Wolf authored
      
      This adds a new QAPI-based monitor_init() function. The existing
      monitor_init_opts() is rewritten to simply put its QemuOpts parameter
      into a visitor and pass the resulting QAPI object to monitor_init().
      
      This will cause some change in those error messages for the monitor
      options in the system emulator that are now generated by the visitor
      rather than explicitly checked in monitor_init_opts().
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-17-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      f2098725
Loading