qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 74f2e0: block/sheepdog: Replace magic val by


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 74f2e0: block/sheepdog: Replace magic val by NANOSECONDS_P...
Date: Fri, 02 Oct 2020 11:15:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 74f2e027663902924a9bd4c88119f27debdb5533
      
https://github.com/qemu/qemu/commit/74f2e027663902924a9bd4c88119f27debdb5533
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  block/sheepdog: Replace magic val by NANOSECONDS_PER_SECOND definition

Use self-explicit NANOSECONDS_PER_SECOND definition instead
of magic value.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200921110145.520944-1-philmd@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 0f3231bfb5a9b83895bad52a0c538818f0a8bd6c
      
https://github.com/qemu/qemu/commit/0f3231bfb5a9b83895bad52a0c538818f0a8bd6c
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M tests/check-block.sh

  Log Message:
  -----------
  tests/check-block: Do not run the iotests with old versions of bash

macOS is shipped with a very old version of the bash (3.2), which
is currently not suitable for running the iotests anymore (e.g.
it is missing support for "readarray" which is used in the file
tests/qemu-iotests/common.filter). Add a check to skip the iotests
in this case - if someone still wants to run the iotests on macOS,
they can install a newer version from homebrew, for example.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200918153514.330705-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 8e7b122bf85e114c1e94443f82244675bbe3d1f3
      
https://github.com/qemu/qemu/commit/8e7b122bf85e114c1e94443f82244675bbe3d1f3
  Author: Alberto Garcia <berto@igalia.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M docs/throttle.txt

  Log Message:
  -----------
  docs: Document the throttle block filter

This filter was added back in 2017 for QEMU 2.11 but it was never
properly documented, so let's explain how it works and add a couple of
examples.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20200921173016.27935-1-berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: da16f4b867e494b0a73ec74555804209c819d2f8
      
https://github.com/qemu/qemu/commit/da16f4b867e494b0a73ec74555804209c819d2f8
  Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io-cmds: Simplify help_oneline

help_oneline is declared and starts as:

  static void help_oneline(const char *cmd, const cmdinfo_t *ct)
  {
      if (cmd) {
          printf("%s ", cmd);
      } else {
          printf("%s ", ct->name);
          if (ct->altname) {
              printf("(or %s) ", ct->altname);
          }
      }

However, there are only two routes to help_oneline being called:

   help_f -> help_all -> help_oneline(ct->name, ct)

   help_f -> help_onecmd(argv[1], ct)

In the first case, 'cmd' and 'ct->name' are the same thing,
so it's impossible for the if (cmd) to be false and then validly
print ct->name - this is upsetting gcc
( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96739 )

In the second case, cmd is argv[1] and we know we've got argv[1]
so again (cmd) is non-NULL.

Simplify help_oneline by just printing cmd.
(Also strengthen argc check just to be pedantic)

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20200824102914.105619-1-dgilbert@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 8760366cdbbddc574860294a443041982b90e2f5
      
https://github.com/qemu/qemu/commit/8760366cdbbddc574860294a443041982b90e2f5
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M include/block/nbd.h
    M nbd/server.c

  Log Message:
  -----------
  nbd: Remove unused nbd_export_get_blockdev()

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-2-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 5daa6bfd8eec913872d6438bc679a92f92a7a0c4
      
https://github.com/qemu/qemu/commit/5daa6bfd8eec913872d6438bc679a92f92a7a0c4
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M blockdev-nbd.c
    M include/block/nbd.h
    M qapi/block-core.json
    A qapi/block-export.json
    M qapi/meson.build
    M qapi/qapi-schema.json
    M storage-daemon/qapi/qapi-schema.json
    M storage-daemon/qemu-storage-daemon.c

  Log Message:
  -----------
  qapi: Create block-export module

Move all block export related types and commands from block-core to the
new QAPI module block-export.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-3-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 143ea7670cbd3865f577602469b5483b550b4c5e
      
https://github.com/qemu/qemu/commit/143ea7670cbd3865f577602469b5483b550b4c5e
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M blockdev-nbd.c
    M qapi/block-export.json
    M storage-daemon/qemu-storage-daemon.c

  Log Message:
  -----------
  qapi: Rename BlockExport to BlockExportOptions

The name BlockExport will be used for the struct containing the runtime
state of block exports, so change the name of export creation options.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-4-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 56ee86261e0ffa151e82b383d9628cf5660be355
      
https://github.com/qemu/qemu/commit/56ee86261e0ffa151e82b383d9628cf5660be355
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    A block/export/export.c
    A block/export/meson.build
    M block/meson.build
    M blockdev-nbd.c
    A include/block/export.h
    M include/block/nbd.h
    M meson.build
    M nbd/server.c
    M qapi/block-export.json

  Log Message:
  -----------
  block/export: Add BlockExport infrastructure and block-export-add

We want to have a common set of commands for all types of block exports.
Currently, this is only NBD, but we're going to add more types.

This patch adds the basic BlockExport and BlockExportDriver structs and
a QMP command block-export-add that creates a new export based on the
given BlockExportOptions.

qmp_nbd_server_add() becomes a wrapper around qmp_block_export_add().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-5-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 060102ad655544501b9d0d9f3fc8b8675883b463
      
https://github.com/qemu/qemu/commit/060102ad655544501b9d0d9f3fc8b8675883b463
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M storage-daemon/qemu-storage-daemon.c

  Log Message:
  -----------
  qemu-storage-daemon: Use qmp_block_export_add()

No reason to duplicate the functionality locally, we can now just reuse
the QMP command block-export-add for --export.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-6-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: b57e4de079d90caca05fed5b45aeb642c6c29aa0
      
https://github.com/qemu/qemu/commit/b57e4de079d90caca05fed5b45aeb642c6c29aa0
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M blockdev-nbd.c
    M include/block/nbd.h
    M nbd/server.c
    M qemu-nbd.c

  Log Message:
  -----------
  qemu-nbd: Use raw block driver for --offset

Instead of implementing qemu-nbd --offset in the NBD code, just put a
raw block node with the requested offset on top of the user image and
rely on that doing the job.

This does not only simplify the nbd_export_new() interface and bring it
closer to the set of options that the nbd-server-add QMP command offers,
but in fact it also eliminates a potential source for bugs in the NBD
code which previously had to add the offset manually in all relevant
places.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-7-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 9b562c646bc0ad5fca3cfa00720e431c7e72769a
      
https://github.com/qemu/qemu/commit/9b562c646bc0ad5fca3cfa00720e431c7e72769a
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/export.h
    M include/block/nbd.h
    M nbd/server.c
    M qemu-nbd.c

  Log Message:
  -----------
  block/export: Remove magic from block-export-add

nbd-server-add tries to be convenient and adds two questionable
features that we don't want to share in block-export-add, even for NBD
exports:

1. When requesting a writable export of a read-only device, the export
   is silently downgraded to read-only. This should be an error in the
   context of block-export-add.

2. When using a BlockBackend name, unplugging the device from the guest
   will automatically stop the NBD server, too. This may sometimes be
   what you want, but it could also be very surprising. Let's keep
   things explicit with block-export-add. If the user wants to stop the
   export, they should tell us so.

Move these things into the nbd-server-add QMP command handler so that
they apply only there.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-8-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1c8222b014484145d66740d0597ae86b4a989b73
      
https://github.com/qemu/qemu/commit/1c8222b014484145d66740d0597ae86b4a989b73
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M blockdev-nbd.c
    M include/block/nbd.h
    M qapi/block-export.json
    M storage-daemon/qemu-storage-daemon.c

  Log Message:
  -----------
  nbd: Add max-connections to nbd-server-start

This is a QMP equivalent of qemu-nbd's --shared option, limiting the
maximum number of clients that can attach at the same time.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-9-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: fefee85da055e100ea86d15274106f78502c2819
      
https://github.com/qemu/qemu/commit/fefee85da055e100ea86d15274106f78502c2819
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M blockdev-nbd.c
    M qapi/block-export.json

  Log Message:
  -----------
  nbd: Add writethrough to block-export-add

qemu-nbd allows use of writethrough cache modes, which mean that write
requests made through NBD will cause a flush before they complete.
Expose the same functionality in block-export-add.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-10-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: d794f7f3728df0845be978a3c9aecead9d48c81d
      
https://github.com/qemu/qemu/commit/d794f7f3728df0845be978a3c9aecead9d48c81d
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M blockdev-nbd.c
    M include/block/nbd.h
    M nbd/server.c
    M qemu-nbd.c

  Log Message:
  -----------
  nbd: Remove NBDExport.close callback

The export close callback is unused by the built-in NBD server. qemu-nbd
uses it only during shutdown to wait for the unrefed export to actually
go away. It can just use nbd_export_close_all() instead and do without
the callback.

This removes the close callback from nbd_export_new() and makes both
callers of it more similar.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-11-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 00917172a688892003605836454312364864e89d
      
https://github.com/qemu/qemu/commit/00917172a688892003605836454312364864e89d
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M blockdev-nbd.c
    M include/block/nbd.h
    M qemu-nbd.c

  Log Message:
  -----------
  qemu-nbd: Use blk_exp_add() to create the export

With this change, NBD exports are now only created through the
BlockExport interface. This allows us finally to move things from the
NBD layer to the BlockExport layer if they make sense for other export
types, too.

blk_exp_add() returns only a weak reference, so the explicit
nbd_export_put() goes away.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-12-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: dbc9e94a23dfdebe3bd610165d25ca080e705455
      
https://github.com/qemu/qemu/commit/dbc9e94a23dfdebe3bd610165d25ca080e705455
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd/server: Simplify export shutdown

Closing export is somewhat convoluted because nbd_export_close() and
nbd_export_put() call each other and the ways they actually end up being
nested is not necessarily obvious.

However, it is not really necessary to call nbd_export_close() from
nbd_export_put() when putting the last reference because it only does
three things:

1. Close all clients. We're going to refcount 0 and all clients hold a
   reference, so we know there is no active client any more.

2. Close the user reference (represented by exp->name being non-NULL).
   The same argument applies: If the export were still named, we would
   still have a reference.

3. Freeing exp->description. This is really cleanup work to be done when
   the export is finally freed. There is no reason to already clear it
   while clients are still in the process of shutting down.

So after moving the cleanup of exp->description, the code can be
simplified so that only nbd_export_close() calls nbd_export_put(), but
never the other way around.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924152717.287415-13-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: c69de1bef59ba0d824cd9d5e9da602cb23c29e4b
      
https://github.com/qemu/qemu/commit/c69de1bef59ba0d824cd9d5e9da602cb23c29e4b
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/export.h
    M include/block/nbd.h
    M nbd/server.c

  Log Message:
  -----------
  block/export: Move refcount from NBDExport to BlockExport

Having a refcount makes sense for all types of block exports. It is also
a prerequisite for keeping a list of all exports at the BlockExport
level.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-14-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 8612c6867341e52416e63fce8b19ede8501c159a
      
https://github.com/qemu/qemu/commit/8612c6867341e52416e63fce8b19ede8501c159a
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M include/block/export.h
    M nbd/server.c

  Log Message:
  -----------
  block/export: Move AioContext from NBDExport to BlockExport

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-15-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: b6076afcabc7a3947d0b212b956f4575e6795c56
      
https://github.com/qemu/qemu/commit/b6076afcabc7a3947d0b212b956f4575e6795c56
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M blockdev-nbd.c
    M qapi/block-export.json
    M qemu-nbd.c

  Log Message:
  -----------
  block/export: Add node-name to BlockExportOptions

Every block export needs a block node to export, so add a 'node-name'
option to BlockExportOptions and remove the replaced option 'device'
from BlockExportOptionsNbd.

To maintain compatibility in nbd-server-add, BlockExportOptionsNbd needs
to be wrapped by a new type NbdServerAddOptions that adds 'device' back
because nbd-server-add doesn't use the BlockExportOptions base type at
all (so even without changing it to a 'node-name' option in
block-export-add, this compatibility code would be necessary).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-16-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a6ff7989662d659aed0888670e77e68cb8c9bd81
      
https://github.com/qemu/qemu/commit/a6ff7989662d659aed0888670e77e68cb8c9bd81
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/export.h
    M include/block/nbd.h
    M nbd/server.c

  Log Message:
  -----------
  block/export: Allocate BlockExport in blk_exp_add()

Instead of letting the driver allocate and return the BlockExport
object, allocate it already in blk_exp_add() and pass it. This allows us
to initialise the generic part before calling into the driver so that
the driver can just use these values instead of having to parse the
options a second time.

For symmetry, move freeing the BlockExport to blk_exp_unref().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-17-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: bc4ee65b8c309ed6a726e3ea1b73f7fa31b4bb95
      
https://github.com/qemu/qemu/commit/bc4ee65b8c309ed6a726e3ea1b73f7fa31b4bb95
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block.c
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/export.h
    M include/block/nbd.h
    M nbd/server.c
    M qemu-nbd.c

  Log Message:
  -----------
  block/export: Add blk_exp_close_all(_type)

This adds a function to shut down all block exports, and another one to
shut down the block exports of a single type. The latter is used for now
when stopping the NBD server. As soon as we implement support for
multiple NBD servers, we'll need a per-server list of exports and it
will be replaced by a function using that.

As a side effect, the BlockExport layer has a list tracking all existing
exports now. closed_exports loses its only user and can go away.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-18-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: d53be9ce55a38e430b88985f637f696bf99cbf0b
      
https://github.com/qemu/qemu/commit/d53be9ce55a38e430b88985f637f696bf99cbf0b
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/export.h
    M qapi/block-export.json
    M qemu-nbd.c
    M storage-daemon/qemu-storage-daemon.c
    M tests/qemu-iotests/223.out

  Log Message:
  -----------
  block/export: Add 'id' option to block-export-add

We'll need an id to identify block exports in monitor commands. This
adds one.

Note that this is different from the 'name' option in the NBD server,
which is the externally visible export name. While block export ids need
to be unique in the whole process, export names must be unique only for
the same server. Different export types or (potentially in the future)
multiple NBD servers can have the same export name externally, but still
need different block export ids internally.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-19-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3859ad36f0bdf45a6610d93296b52c9604b6d6f7
      
https://github.com/qemu/qemu/commit/3859ad36f0bdf45a6610d93296b52c9604b6d6f7
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/export.h
    M nbd/server.c

  Log Message:
  -----------
  block/export: Move strong user reference to block_exports

The reference owned by the user/monitor that is created when adding the
export and dropped when removing it was tied to the 'exports' list in
nbd/server.c. Every block export will have a user reference, so move it
to the block export level and tie it to the 'block_exports' list in
block/export/export.c instead. This is necessary for introducing a QMP
command for removing exports.

Note that exports are present in block_exports even after the user has
requested shutdown. This is different from NBD's exports where exports
are immediately removed on a shutdown request, even if they are still in
the process of shutting down. In order to avoid that the user still
interacts with an export that is shutting down (and possibly removes it
a second time), we need to remember if the user actually still owns it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-20-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3c3bc462adeb561f5dfdcbb84ae691c95ccef916
      
https://github.com/qemu/qemu/commit/3c3bc462adeb561f5dfdcbb84ae691c95ccef916
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M block/monitor/block-hmp-cmds.c
    M blockdev-nbd.c
    M include/block/export.h
    M include/block/nbd.h
    M nbd/server.c
    M qapi/block-export.json

  Log Message:
  -----------
  block/export: Add block-export-del

Implement a new QMP command block-export-del and make nbd-server-remove
a wrapper around it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-21-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1a9f7a804f52caee6bc6769a8bb0a018e6c8ec81
      
https://github.com/qemu/qemu/commit/1a9f7a804f52caee6bc6769a8bb0a018e6c8ec81
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M qapi/block-export.json
    M tests/qemu-iotests/140
    M tests/qemu-iotests/140.out
    M tests/qemu-iotests/223.out

  Log Message:
  -----------
  block/export: Add BLOCK_EXPORT_DELETED event

Clients may want to know when an export has finally disappeard
(block-export-del returns earlier than that in the general case), so add
a QAPI event for it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-22-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 37a4f70cea72a38fe981cbff517c222cefa46f21
      
https://github.com/qemu/qemu/commit/37a4f70cea72a38fe981cbff517c222cefa46f21
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M include/block/export.h
    M nbd/server.c

  Log Message:
  -----------
  block/export: Move blk to BlockExport

Every block export has a BlockBackend representing the disk that is
exported. It should live in BlockExport therefore.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-23-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 331170e0732617b931959f7c617af3823f8fe95e
      
https://github.com/qemu/qemu/commit/331170e0732617b931959f7c617af3823f8fe95e
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M include/block/nbd.h
    M nbd/server.c

  Log Message:
  -----------
  block/export: Create BlockBackend in blk_exp_add()

Every export type will need a BlockBackend, so creating it centrally in
blk_exp_add() instead of the .create driver callback avoids duplication.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-24-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 8cade320c8838952b5f589c6df26b2e62dd099d7
      
https://github.com/qemu/qemu/commit/8cade320c8838952b5f589c6df26b2e62dd099d7
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M qapi/block-export.json

  Log Message:
  -----------
  block/export: Add query-block-exports

This adds a simple QMP command to query the list of block exports.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-25-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 30dbc81d310cc5c78589ab689083371c4bfced1f
      
https://github.com/qemu/qemu/commit/30dbc81d310cc5c78589ab689083371c4bfced1f
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/export/export.c
    M blockdev-nbd.c
    M nbd/server.c
    M qapi/block-export.json
    M qemu-nbd.c

  Log Message:
  -----------
  block/export: Move writable to BlockExportOptions

The 'writable' option is a basic option that will probably be applicable
to most if not all export types that we will implement. Move it from NBD
to the generic BlockExport layer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-26-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 5b1cb49704551cff8913032b22c9d6566d217cbb
      
https://github.com/qemu/qemu/commit/5b1cb49704551cff8913032b22c9d6566d217cbb
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M blockdev-nbd.c
    M include/block/nbd.h
    M nbd/server.c

  Log Message:
  -----------
  nbd: Merge nbd_export_new() and nbd_export_create()

There is no real reason any more why nbd_export_new() and
nbd_export_create() should be separate functions. The latter only
performs a few checks before it calls the former.

What makes the current state stand out is that it's the only function in
BlockExportDriver that is not a static function inside nbd/server.c, but
a small wrapper in blockdev-nbd.c that then calls back into nbd/server.c
for the real functionality.

Move all the checks to nbd/server.c and make the resulting function
static to improve readability.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-27-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 443127e81b9b83c402dc510910cc6841e1039e37
      
https://github.com/qemu/qemu/commit/443127e81b9b83c402dc510910cc6841e1039e37
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M docs/system/deprecated.rst
    M qapi/block-export.json

  Log Message:
  -----------
  nbd: Deprecate nbd-server-add/remove

These QMP commands are replaced by block-export-add/del.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-28-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 91efbae93887a2b80e2979d8b8a169302cf927d1
      
https://github.com/qemu/qemu/commit/91efbae93887a2b80e2979d8b8a169302cf927d1
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

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

  Log Message:
  -----------
  iotests: Factor out qemu_tool_pipe_and_status()

We have three almost identical functions that call an external process
and return its output and return code. Refactor them into small wrappers
around a common function.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-29-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 81b6b2bc1af5b651e4cc659b0dbbf9626fbc227c
      
https://github.com/qemu/qemu/commit/81b6b2bc1af5b651e4cc659b0dbbf9626fbc227c
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

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

  Log Message:
  -----------
  iotests: Introduce qemu_nbd_list_log()

Add a function to list the NBD exports offered by an NBD server.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-30-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: f71255228e7a906511c8d862c076cd184069d28c
      
https://github.com/qemu/qemu/commit/f71255228e7a906511c8d862c076cd184069d28c
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

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

  Log Message:
  -----------
  iotests: Allow supported and unsupported formats at the same time

This is useful for specifying 'generic' as supported (which includes
only writable image formats), but still excluding some incompatible
writable formats.

It also removes more lines than it adds.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-31-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: f51af04cce148e825a9f3c4f446e5cd3cfaff71d
      
https://github.com/qemu/qemu/commit/f51af04cce148e825a9f3c4f446e5cd3cfaff71d
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    A tests/qemu-iotests/307
    A tests/qemu-iotests/307.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: Test block-export-* QMP interface

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-32-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 45db4bc1fccf10e8a49d1052e4be30c547ff1824
      
https://github.com/qemu/qemu/commit/45db4bc1fccf10e8a49d1052e4be30c547ff1824
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M storage-daemon/qemu-storage-daemon.c

  Log Message:
  -----------
  qemu-storage-daemon: Fix help line for --export

Commit 5f479a8d renamed the 'device' option of --export into
'node-name', but forgot to update the help in qemu-storage-daemon.

Fixes: 5f479a8dc086bfa42c9f94e9ab69962f256e207f
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200930133909.58820-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: c508c73dca636cc0fc7413d1e4a43fcfe4a5698c
      
https://github.com/qemu/qemu/commit/c508c73dca636cc0fc7413d1e4a43fcfe4a5698c
  Author: Alberto Garcia <berto@igalia.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Use L1E_SIZE in qcow2_write_l1_entry()

We overlooked these in 02b1ecfa100e7ecc2306560cd27a4a2622bfeb04

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20200928162333.14998-1-berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 469e72ab7dbbd7ff4ee601e5ea7c29545d46593b
      
https://github.com/qemu/qemu/commit/469e72ab7dbbd7ff4ee601e5ea7c29545d46593b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M block.c
    A block/export/export.c
    A block/export/meson.build
    M block/meson.build
    M block/monitor/block-hmp-cmds.c
    M block/qcow2-cluster.c
    M block/sheepdog.c
    M blockdev-nbd.c
    M docs/system/deprecated.rst
    M docs/throttle.txt
    A include/block/export.h
    M include/block/nbd.h
    M meson.build
    M nbd/server.c
    M qapi/block-core.json
    A qapi/block-export.json
    M qapi/meson.build
    M qapi/qapi-schema.json
    M qemu-io-cmds.c
    M qemu-nbd.c
    M storage-daemon/qapi/qapi-schema.json
    M storage-daemon/qemu-storage-daemon.c
    M tests/check-block.sh
    M tests/qemu-iotests/140
    M tests/qemu-iotests/140.out
    M tests/qemu-iotests/223.out
    A tests/qemu-iotests/307
    A tests/qemu-iotests/307.out
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches:

- Add block export infrastructure
- iotests improvements
- Document the throttle block filter
- Misc code cleanups

# gpg: Signature made Fri 02 Oct 2020 15:36:53 BST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# 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: (37 commits)
  qcow2: Use L1E_SIZE in qcow2_write_l1_entry()
  qemu-storage-daemon: Fix help line for --export
  iotests: Test block-export-* QMP interface
  iotests: Allow supported and unsupported formats at the same time
  iotests: Introduce qemu_nbd_list_log()
  iotests: Factor out qemu_tool_pipe_and_status()
  nbd: Deprecate nbd-server-add/remove
  nbd: Merge nbd_export_new() and nbd_export_create()
  block/export: Move writable to BlockExportOptions
  block/export: Add query-block-exports
  block/export: Create BlockBackend in blk_exp_add()
  block/export: Move blk to BlockExport
  block/export: Add BLOCK_EXPORT_DELETED event
  block/export: Add block-export-del
  block/export: Move strong user reference to block_exports
  block/export: Add 'id' option to block-export-add
  block/export: Add blk_exp_close_all(_type)
  block/export: Allocate BlockExport in blk_exp_add()
  block/export: Add node-name to BlockExportOptions
  block/export: Move AioContext from NBDExport to BlockExport
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/dd8c1e808f1c...469e72ab7dbb



reply via email to

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