qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f70962: block: Remove host floppy support


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f70962: block: Remove host floppy support
Date: Mon, 26 Oct 2015 03:00:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f709623b3d30096c629f6a368670c9cf668da83f
      
https://github.com/qemu/qemu/commit/f709623b3d30096c629f6a368670c9cf668da83f
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/raw-posix.c
    M qapi/block-core.json

  Log Message:
  -----------
  block: Remove host floppy support

It has been deprecated as of 2.3, so we can now remove it.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d44f928a54497188c25357840a3224925d1b527b
      
https://github.com/qemu/qemu/commit/d44f928a54497188c25357840a3224925d1b527b
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c
    M blockdev.c

  Log Message:
  -----------
  block: Set BDRV_O_INCOMING in bdrv_fill_options()

This flag should not be set for the root BDS only, but for any BDS that
is being created while incoming migration is pending, so setting it is
moved from blockdev_init() to bdrv_fill_options().

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: be4b67bc7d99da26b7878f7f45370f50a3bd4af5
      
https://github.com/qemu/qemu/commit/be4b67bc7d99da26b7878f7f45370f50a3bd4af5
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c
    M qapi/block-core.json
    M tests/qemu-iotests/087
    M tests/qemu-iotests/087.out

  Log Message:
  -----------
  blockdev: Allow creation of BDS trees without BB

If the "id" field is missing from the options given to blockdev-add,
just omit the BlockBackend and create the BlockDriverState tree alone.

However, if "id" is missing, "node-name" must be specified; otherwise,
the BDS tree would no longer be accessible.

Many BDS options which are not parsed by bdrv_open() (like caching)
cannot be specified for these BB-less BDS trees yet. A future patch will
remove this limitation.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8e9e653038db97bfd343c3fb217b7bf4da765a89
      
https://github.com/qemu/qemu/commit/8e9e653038db97bfd343c3fb217b7bf4da765a89
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M tests/qemu-iotests/071
    M tests/qemu-iotests/071.out
    M tests/qemu-iotests/081
    M tests/qemu-iotests/081.out

  Log Message:
  -----------
  iotests: Only create BB if necessary

Tests 071 and 081 test giving references in blockdev-add. It is not
necessary to create a BlockBackend here, so omit it.

While at it, fix up some blockdev-add invocations in the vicinity
(s/raw/$IMGFMT/ in 081, drop the format BDS for blkverify's raw child in
071).

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e031f750483377a5e5de4c92af68dfa68e4d0aae
      
https://github.com/qemu/qemu/commit/e031f750483377a5e5de4c92af68dfa68e4d0aae
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/raw-posix.c
    M block/raw_bsd.c
    M include/block/block.h
    M include/block/block_int.h
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Make bdrv_is_inserted() return a bool

Make bdrv_is_inserted(), blk_is_inserted(), and the callback
BlockDriver.bdrv_is_inserted() return a bool.

Suggested-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: db0284f86a31ec66d138f0f7794321c306af969e
      
https://github.com/qemu/qemu/commit/db0284f86a31ec66d138f0f7794321c306af969e
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Add blk_is_available()

blk_is_available() returns true iff the BDS is inserted (which means
blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the
tray of the guest device is closed.

blk_is_inserted() is changed to return true only if blk_bs() is not
NULL.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 28d7a78996ae73e681d0e061a4be446ed2240c97
      
https://github.com/qemu/qemu/commit/28d7a78996ae73e681d0e061a4be446ed2240c97
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Make bdrv_is_inserted() recursive

If bdrv_is_inserted() is called on the top level BDS, it should make
sure all nodes in the BDS tree are actually inserted.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1354c473789a91ba603d40bdf2521e3221c0a69f
      
https://github.com/qemu/qemu/commit/1354c473789a91ba603d40bdf2521e3221c0a69f
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/raw_bsd.c

  Log Message:
  -----------
  block/raw_bsd: Drop raw_is_inserted()

With the new automatically-recursive implementation of
bdrv_is_inserted() checking by default whether all the children of a BDS
are inserted, we can drop raw's own implementation.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b4d02820d95e025e57d82144f7b2ccd677ac2418
      
https://github.com/qemu/qemu/commit/b4d02820d95e025e57d82144f7b2ccd677ac2418
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Invoke change media CB before NULLing drv

In order to handle host device passthrough, some guest device models
may call blk_is_inserted() to check whether the medium is inserted on
the host, when checking the guest tray status.

This tray status is inquired by blk_dev_change_media_cb(); because
bdrv_is_inserted() (invoked by blk_is_inserted()) always returns false
for BDS with drv set to NULL, blk_dev_change_media_cb() should therefore
be called before drv is set to NULL.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2e1280e8ff95b3145bc6262accc9d447718e5318
      
https://github.com/qemu/qemu/commit/2e1280e8ff95b3145bc6262accc9d447718e5318
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M hw/block/fdc.c
    M tests/fdc-test.c

  Log Message:
  -----------
  hw/block/fdc: Implement tray status

The tray of an FDD is open iff there is no medium inserted (there are
only two states for an FDD: "medium inserted" or "no medium inserted").

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7d3467d903c0fa663fbe3f1002e7c624a210b634
      
https://github.com/qemu/qemu/commit/7d3467d903c0fa663fbe3f1002e7c624a210b634
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M hw/usb/dev-storage.c

  Log Message:
  -----------
  hw/usb-storage: Check whether BB is inserted

Only call bdrv_add_key() on the BlockDriverState if it is not NULL.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4981bdec0d9b3ddd3e1474de5aa9918f120b54f7
      
https://github.com/qemu/qemu/commit/4981bdec0d9b3ddd3e1474de5aa9918f120b54f7
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block: Fix BB AIOCB AioContext without BDS

Fix the BlockBackend's AIOCB AioContext for aborting AIO in case there
is no BDS. If there is no implementation of AIOCBInfo::get_aio_context()
the AioContext is derived from the BDS the AIOCB belongs to. If that BDS
is NULL (because it has been removed from the BB) this will not work.

This patch makes blk_get_aio_context() fall back to the main loop
context if the BDS pointer is NULL and implements
AIOCBInfo::get_aio_context() (blk_aiocb_get_aio_context()) which invokes
blk_get_aio_context().

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 68e9ec017bb00b96633d48b5bf039a37daa3bc21
      
https://github.com/qemu/qemu/commit/68e9ec017bb00b96633d48b5bf039a37daa3bc21
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c
    M block/block-backend.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Move guest_block_size into BlockBackend

guest_block_size is a guest device property so it should be moved into
the interface between block layer and guest devices, which is the
BlockBackend.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 53d8f9d8fbf85f04d423958248f8c2fbe1ece192
      
https://github.com/qemu/qemu/commit/53d8f9d8fbf85f04d423958248f8c2fbe1ece192
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/accounting.c
    M block/io.c
    M block/qapi.c
    M include/block/accounting.h
    M include/block/block_int.h
    M qmp-commands.hx

  Log Message:
  -----------
  block: Remove wr_highest_sector from BlockAcctStats

BlockAcctStats contains statistics about the data transferred from and
to the device; wr_highest_sector does not fit in with the rest.

Furthermore, those statistics are supposed to be specific for a certain
device and not necessarily for a BDS (see the comment above
bdrv_get_stats()); on the other hand, wr_highest_sector may be a rather
important information to know for each BDS. When BlockAcctStats is
finally removed from the BDS, we will want to keep wr_highest_sector in
the BDS.

Finally, wr_highest_sector is renamed to wr_highest_offset and given the
appropriate meaning. Externally, it is represented as an offset so there
is no point in doing something different internally. Its definition is
changed to match that in qapi/block-core.json which is "the offset after
the greatest byte written to". Doing so should not cause any harm since
if external programs tried to calculate the volume usage by
(wr_highest_offset + 512) / volume_size, after this patch they will just
assume the volume to be full slightly earlier than before.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7f0e9da6f134c5303be51333696e1ff54697f3e0
      
https://github.com/qemu/qemu/commit/7f0e9da6f134c5303be51333696e1ff54697f3e0
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/io.c
    M block/qapi.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Move BlockAcctStats into BlockBackend

As the comment above bdrv_get_stats() says, BlockAcctStats is something
which belongs to the device instead of each BlockDriverState. This patch
therefore moves it into the BlockBackend.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 373340b26caa1572cf0f155131569dfc527aa133
      
https://github.com/qemu/qemu/commit/373340b26caa1572cf0f155131569dfc527aa133
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c
    M block/backup.c
    M block/block-backend.c
    M block/commit.c
    M block/mirror.c
    M block/qapi.c
    M block/stream.c
    M blockdev.c
    M blockjob.c
    M include/block/block.h
    M include/block/block_int.h
    M include/sysemu/block-backend.h
    M qmp.c

  Log Message:
  -----------
  block: Move I/O status and error actions into BB

These options are only relevant for the user of a whole BDS tree (like a
guest device or a block job) and should thus be moved into the
BlockBackend.

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 973f2ddf7b48c27aa8642047796cca3bec0b48d8
      
https://github.com/qemu/qemu/commit/973f2ddf7b48c27aa8642047796cca3bec0b48d8
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/throttle-groups.c
    M include/block/throttle-groups.h

  Log Message:
  -----------
  block/throttle-groups: Make incref/decref public

Throttle groups are not necessarily referenced by BDSs alone; a later
patch will essentially allow BBs to reference them, too. Make the
ref/unref functions public so that reference can be properly accounted
for.

Their interface is slightly adjusted in that they return and take a
ThrottleState pointer, respectively, instead of a ThrottleGroup pointer.
Functionally, they are equivalent, but since ThrottleGroup is not meant
to be used outside of block/throttle-groups.c, ThrottleState is easier
to handle.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 281d22d86ca26bf356284719e44c4bc66b716415
      
https://github.com/qemu/qemu/commit/281d22d86ca26bf356284719e44c4bc66b716415
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c
    M include/block/block_int.h
    M include/qemu/typedefs.h
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Add BlockBackendRootState

This structure will store some of the state of the root BDS if the BDS
tree is removed, so that state can be restored once a new BDS tree is
inserted.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 061959e8da5af59343e2c75d55c40f366d0164f9
      
https://github.com/qemu/qemu/commit/061959e8da5af59343e2c75d55c40f366d0164f9
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block: Make some BB functions fall back to BBRS

If there is no BDS tree attached to a BlockBackend, functions that can
do so should fall back to the BlockBackendRootState structure.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c09ba36c9ab62e3043041e429205f57ffbe3ba8b
      
https://github.com/qemu/qemu/commit/c09ba36c9ab62e3043041e429205f57ffbe3ba8b
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block: Fail requests to empty BlockBackend

If there is no BlockDriverState in a BlockBackend or if the tray of the
guest device is open, fail all requests (where that is possible) with
-ENOMEDIUM.

The reason the status of the guest device is taken into account is
because once the guest device's tray is opened, any request on the same
BlockBackend as the guest uses should fail. If the BDS tree is supposed
to be usable even after ejecting it from the guest, a different
BlockBackend must be used.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a46fc9c95012f3d7ed2b29b59f042246d62a08d7
      
https://github.com/qemu/qemu/commit/a46fc9c95012f3d7ed2b29b59f042246d62a08d7
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block: Prepare remaining BB functions for NULL BDS

There are several BlockBackend functions which, in theory, cannot fail.
This patch makes them cope with the BlockDriverState pointer being NULL
by making them fall back to some default action like ignoring the value
in setters and returning the default in getters.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0c3c36d651922ebe9244e68e6d9ed14cdfcac9fd
      
https://github.com/qemu/qemu/commit/0c3c36d651922ebe9244e68e6d9ed14cdfcac9fd
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Add blk_insert_bs()

This function associates the given BlockDriverState with the given
BlockBackend.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5433c24f0f9306c82ad9bcc2b2b586e5f0ed8fa5
      
https://github.com/qemu/qemu/commit/5433c24f0f9306c82ad9bcc2b2b586e5f0ed8fa5
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block.c
    M block/qapi.c
    M blockdev.c
    M hw/block/xen_disk.c
    M migration/block.c
    M monitor.c

  Log Message:
  -----------
  block: Prepare for NULL BDS

blk_bs() will not necessarily return a non-NULL value any more (unless
blk_is_available() is true or it can be assumed to otherwise, e.g.
because it is called immediately after a successful blk_new_with_bs() or
blk_new_open()).

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5ec18f8c83583b7e22ed4dd360cd937da801ca40
      
https://github.com/qemu/qemu/commit/5ec18f8c83583b7e22ed4dd360cd937da801ca40
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Do not create BDS for empty drive

Do not use "rudimentary" BDSs for empty drives any longer (for
freshly created drives).

After a follow-up patch, empty drives will generally use a NULL BDS, not
only the freshly created drives.

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: fbf8175eac92cca541efb1ac4a202fba941b78df
      
https://github.com/qemu/qemu/commit/fbf8175eac92cca541efb1ac4a202fba941b78df
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Pull out blockdev option extraction

Extract some of the blockdev option extraction code from blockdev_init()
into its own function. This simplifies blockdev_init() and will allow
reusing the code in a different function added in a follow-up patch.

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bd745e238bb9432f40c875b6b4ad96a3d90e16a0
      
https://github.com/qemu/qemu/commit/bd745e238bb9432f40c875b6b4ad96a3d90e16a0
  Author: Max Reitz <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Allow more options for BB-less BDS tree

Most of the options which blockdev_init() parses for both the
BlockBackend and the root BDS are valid for just the root BDS as well
(e.g. read-only). This patch allows specifying these options even if not
creating a BlockBackend.

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d87d01e16a0e59a6af9634162cf0ded142b43e0d
      
https://github.com/qemu/qemu/commit/d87d01e16a0e59a6af9634162cf0ded142b43e0d
  Author: Alberto Garcia <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/throttle-groups.c
    M include/block/throttle-groups.h

  Log Message:
  -----------
  throttle: Remove throttle_group_lock/unlock()

The group throttling code was always meant to handle its locking
internally. However, bdrv_swap() was touching the ThrottleGroup
structure directly and therefore needed an API for that.

Now that bdrv_swap() no longer exists there's no need for the
throttle_group_lock() API anymore.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dca21ef23ba48f6f1428c59f295a857e5dc203c8
      
https://github.com/qemu/qemu/commit/dca21ef23ba48f6f1428c59f295a857e5dc203c8
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M aio-posix.c
    M aio-win32.c
    M async.c
    M block/curl.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/nbd-client.c
    M block/nfs.c
    M block/sheepdog.c
    M block/ssh.c
    M block/win32-aio.c
    M hw/block/dataplane/virtio-blk.c
    M hw/scsi/virtio-scsi-dataplane.c
    M include/block/aio.h
    M iohandler.c
    M nbd.c
    M tests/test-aio.c

  Log Message:
  -----------
  aio: Add "is_external" flag for event handlers

All callers pass in false, and the real external ones will switch to
true in coming patches.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 172cc129a5ae58d36feb51f97fd67e2161ae5cc6
      
https://github.com/qemu/qemu/commit/172cc129a5ae58d36feb51f97fd67e2161ae5cc6
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M nbd.c

  Log Message:
  -----------
  nbd: Mark fd handlers client type as "external"

So we could distinguish it from internal used fds, thus avoid handling
unwanted events in nested aio polls.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3a1e8074d74ad2acbcedf28d35aebedc3573f19e
      
https://github.com/qemu/qemu/commit/3a1e8074d74ad2acbcedf28d35aebedc3573f19e
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M hw/block/dataplane/virtio-blk.c
    M hw/scsi/virtio-scsi-dataplane.c

  Log Message:
  -----------
  dataplane: Mark host notifiers' client type as "external"

They will be excluded by type in the nested event loops in block layer,
so that unwanted events won't be processed there.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c1e1e5fa8f25f9061b076a05045a6d4950d1a891
      
https://github.com/qemu/qemu/commit/c1e1e5fa8f25f9061b076a05045a6d4950d1a891
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M aio-posix.c
    M aio-win32.c
    M include/block/aio.h

  Log Message:
  -----------
  aio: introduce aio_{disable,enable}_external

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 51288d7917e5c5b088985aaa7ff3592561fbc2ba
      
https://github.com/qemu/qemu/commit/51288d7917e5c5b088985aaa7ff3592561fbc2ba
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M block/io.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Introduce "drained begin/end" API

The semantics is that after bdrv_drained_begin(bs), bs will not get new external
requests until the matching bdrv_drained_end(bs).

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: da763e83012c066ebe3effbaa8e7e7c8f78b0fbf
      
https://github.com/qemu/qemu/commit/da763e83012c066ebe3effbaa8e7e7c8f78b0fbf
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Add "drained begin/end" for transactional external snapshot

This ensures the atomicity of the transaction by avoiding processing of
external requests such as those from ioeventfd.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1fdd4b7be3655d39c3594bc215eb1df5ce225c7d
      
https://github.com/qemu/qemu/commit/1fdd4b7be3655d39c3594bc215eb1df5ce225c7d
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Add "drained begin/end" for transactional backup

This ensures the atomicity of the transaction by avoiding processing of
external requests such as those from ioeventfd.

Move the assignment to state->bs up right after bdrv_drained_begin, so
that we can use it in the clean callback. The abort callback will still
check bs->job and state->job, so it's OK.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ff52bf36a3a6c63b7528fbe64e9ed9976b221e68
      
https://github.com/qemu/qemu/commit/ff52bf36a3a6c63b7528fbe64e9ed9976b221e68
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Add "drained begin/end" for transactional blockdev-backup

Similar to the previous patch, make sure that external events are not
dispatched during transaction operations.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 507306cc8ee7981894a96c380f42d80e2674cb04
      
https://github.com/qemu/qemu/commit/507306cc8ee7981894a96c380f42d80e2674cb04
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Add "drained begin/end" for internal snapshot

This ensures the atomicity of the transaction by avoiding processing of
external requests such as those from ioeventfd.

state->bs is assigned right after bdrv_drained_begin. Because it was
used as the flag for deletion or not in abort, now we need a separate
flag - InternalSnapshotState.created.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c07bc2c1658fffeee08eb46402b2f66d55b07586
      
https://github.com/qemu/qemu/commit/c07bc2c1658fffeee08eb46402b2f66d55b07586
  Author: Fam Zheng <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M tests/test-aio.c

  Log Message:
  -----------
  tests: Add test case for aio_disable_external

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: af25e7277d3e95a3ea31023f31d8097ab5e2ac84
      
https://github.com/qemu/qemu/commit/af25e7277d3e95a3ea31023f31d8097ab5e2ac84
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-23 (Fri, 23 Oct 2015)

  Changed paths:
    M aio-posix.c
    M aio-win32.c
    M async.c
    M block.c
    M block/accounting.c
    M block/backup.c
    M block/block-backend.c
    M block/commit.c
    M block/curl.c
    M block/io.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/mirror.c
    M block/nbd-client.c
    M block/nfs.c
    M block/qapi.c
    M block/raw-posix.c
    M block/raw_bsd.c
    M block/sheepdog.c
    M block/ssh.c
    M block/stream.c
    M block/throttle-groups.c
    M block/win32-aio.c
    M blockdev.c
    M blockjob.c
    M hw/block/dataplane/virtio-blk.c
    M hw/block/fdc.c
    M hw/block/xen_disk.c
    M hw/scsi/virtio-scsi-dataplane.c
    M hw/usb/dev-storage.c
    M include/block/accounting.h
    M include/block/aio.h
    M include/block/block.h
    M include/block/block_int.h
    M include/block/throttle-groups.h
    M include/qemu/typedefs.h
    M include/sysemu/block-backend.h
    M iohandler.c
    M migration/block.c
    M monitor.c
    M nbd.c
    M qapi/block-core.json
    M qmp-commands.hx
    M qmp.c
    M tests/fdc-test.c
    M tests/qemu-iotests/071
    M tests/qemu-iotests/071.out
    M tests/qemu-iotests/081
    M tests/qemu-iotests/081.out
    M tests/qemu-iotests/087
    M tests/qemu-iotests/087.out
    M tests/test-aio.c

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

Block layer patches

# gpg: Signature made Fri 23 Oct 2015 17:59:56 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream: (37 commits)
  tests: Add test case for aio_disable_external
  block: Add "drained begin/end" for internal snapshot
  block: Add "drained begin/end" for transactional blockdev-backup
  block: Add "drained begin/end" for transactional backup
  block: Add "drained begin/end" for transactional external snapshot
  block: Introduce "drained begin/end" API
  aio: introduce aio_{disable,enable}_external
  dataplane: Mark host notifiers' client type as "external"
  nbd: Mark fd handlers client type as "external"
  aio: Add "is_external" flag for event handlers
  throttle: Remove throttle_group_lock/unlock()
  blockdev: Allow more options for BB-less BDS tree
  blockdev: Pull out blockdev option extraction
  blockdev: Do not create BDS for empty drive
  block: Prepare for NULL BDS
  block: Add blk_insert_bs()
  block: Prepare remaining BB functions for NULL BDS
  block: Fail requests to empty BlockBackend
  block: Make some BB functions fall back to BBRS
  block: Add BlockBackendRootState
  ...

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


Compare: https://github.com/qemu/qemu/compare/bc79082e4cd1...af25e7277d3e

reply via email to

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