qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d8bb71: qcow2: fix leak of Qcow2DiscardRegion


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] d8bb71: qcow2: fix leak of Qcow2DiscardRegion in update_re...
Date: Wed, 22 Oct 2014 11:00:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d8bb71b6227366c188595b91c24a58c9b06e46dd
      
https://github.com/qemu/qemu/commit/d8bb71b6227366c188595b91c24a58c9b06e46dd
  Author: Zhang Haoyu <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard

When the Qcow2DiscardRegion is adjacent to another one referenced by "d",
free this Qcow2DiscardRegion metadata referenced by "p" after
it was removed from s->discards queue.

Signed-off-by: Zhang Haoyu <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 38c4d0aea3e1264c86e282d99560330adf2b6e25
      
https://github.com/qemu/qemu/commit/38c4d0aea3e1264c86e282d99560330adf2b6e25
  Author: Tony Breeds <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  block/raw-posix: Fix disk corruption in try_fiemap

Using fiemap without FIEMAP_FLAG_SYNC is a known corrupter.

Add the FIEMAP_FLAG_SYNC flag to the FS_IOC_FIEMAP ioctl.  This has
the downside of significantly reducing performance.

Reported-By: Michael Steffens <address@hidden>
Signed-off-by: Tony Breeds <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: Pádraig Brady <address@hidden>
Cc: Eric Blake <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7c15903789953ead14a417882657d52dc0c19a24
      
https://github.com/qemu/qemu/commit/7c15903789953ead14a417882657d52dc0c19a24
  Author: Tony Breeds <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  block/raw-posix: use seek_hole ahead of fiemap

try_fiemap() uses FIEMAP_FLAG_SYNC which has a significant performance
impact.

Prefer seek_hole() over fiemap() to avoid this impact where possible.
seek_hole is more widely used and, arguably, has potential to be
optimised in the kernel.

Reported-By: Michael Steffens <address@hidden>
Signed-off-by: Tony Breeds <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: Pádraig Brady <address@hidden>
Cc: Eric Blake <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ec0de76874462c745a1600911bd81ee0253c0c23
      
https://github.com/qemu/qemu/commit/ec0de76874462c745a1600911bd81ee0253c0c23
  Author: Max Reitz <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: Fix filename generation

Export names may be used with nbd+unix, too, fix nbd_refresh_filename()
accordingly. Also, for nbd+tcp, the documented path schema is
"nbd://host[:port]/export", so use it. Furthermore, as can be seen from
that schema, the port is optional.

That makes six single cases for how the filename can be formatted; it is
not easy to generalize these cases without the resulting statement being
completely unreadable, thus there is simply one snprintf() per case.

Finally, taking the options from BDRVNBDState::socket_opts is wrong,
because those will not contain the export name. Just use
BlockDriverState::options instead.

Reported-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e4e9986b1caebebdbe53d6f9ad5b03d5ba83f4c3
      
https://github.com/qemu/qemu/commit/e4e9986b1caebebdbe53d6f9ad5b03d5ba83f4c3
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block.c
    M block/iscsi.c
    M block/vvfat.c
    M blockdev.c
    M hw/block/xen_disk.c
    M include/block/block.h
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c

  Log Message:
  -----------
  block: Split bdrv_new_root() off bdrv_new()

Creating an anonymous BDS can't fail.  Make that obvious.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 26f54e9a3cfe62fca61baf83a06b269935d6b9a4
      
https://github.com/qemu/qemu/commit/26f54e9a3cfe62fca61baf83a06b269935d6b9a4
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/Makefile.objs
    A block/block-backend.c
    M blockdev.c
    M hw/block/xen_disk.c
    M include/qemu/typedefs.h
    A include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c

  Log Message:
  -----------
  block: New BlockBackend

A block device consists of a frontend device model and a backend.

A block backend has a tree of block drivers doing the actual work.
The tree is managed by the block layer.

We currently use a single abstraction BlockDriverState both for tree
nodes and the backend as a whole.  Drawbacks:

* Its API includes both stuff that makes sense only at the block
  backend level (root of the tree) and stuff that's only for use
  within the block layer.  This makes the API bigger and more complex
  than necessary.  Moreover, it's not obvious which interfaces are
  meant for device models, and which really aren't.

* Since device models keep a reference to their backend, the backend
  object can't just be destroyed.  But for media change, we need to
  replace the tree.  Our solution is to make the BlockDriverState
  generic, with actual driver state in a separate object, pointed to
  by member opaque.  That lets us replace the tree by deinitializing
  and reinitializing its root.  This special need of the root makes
  the data structure awkward everywhere in the tree.

The general plan is to separate the APIs into "block backend", for use
by device models, monitor and whatever other code dealing with block
backends, and "block driver", for use by the block layer and whatever
other code (if any) dealing with trees and tree nodes.

Code dealing with block backends, device models in particular, should
become completely oblivious of BlockDriverState.  This should let us
clean up both APIs, and the tree data structures.

This commit is a first step.  It creates a minimal "block backend"
API: type BlockBackend and functions to create, destroy and find them.

BlockBackend objects are created and destroyed exactly when root
BlockDriverState objects are created and destroyed.  "Root" in the
sense of "in bdrv_states".  They're not yet used for anything; that'll
come shortly.

A root BlockDriverState is created with bdrv_new_root(), so where to
create a BlockBackend is obvious.  Where these roots get destroyed
isn't always as obvious.

It is obvious in qemu-img.c, qemu-io.c and qemu-nbd.c, and in error
paths of blockdev_init(), blk_connect().  That leaves destruction of
objects successfully created by blockdev_init() and blk_connect().

blockdev_init() is used only by drive_new() and qmp_blockdev_add().
Objects created by the latter are currently indestructible (see commit
48f364d "blockdev: Refuse to drive_del something added with
blockdev-add" and commit 2d246f0 "blockdev: Introduce
DriveInfo.enable_auto_del").  Objects created by the former get
destroyed by drive_del().

Objects created by blk_connect() get destroyed by blk_disconnect().

BlockBackend is reference-counted.  Its reference count never exceeds
one so far, but that's going to change.

In drive_del(), the BB's reference count is surely one now.  The BDS's
reference count is greater than one when something else is holding a
reference, such as a block job.  In this case, the BB is destroyed
right away, but the BDS lives on until all extra references get
dropped.

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


  Commit: 7e7d56d9e05b340290669442cfa05f5869204572
      
https://github.com/qemu/qemu/commit/7e7d56d9e05b340290669442cfa05f5869204572
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block.c
    M block/block-backend.c
    M blockdev.c
    M hw/block/xen_disk.c
    M include/block/block_int.h
    M include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c

  Log Message:
  -----------
  block: Connect BlockBackend to BlockDriverState

Convenience function blk_new_with_bs() creates a BlockBackend with its
BlockDriverState.  Callers have to unref both.  The commit after next
will relieve them of the need to unref the BlockDriverState.

Complication: due to the silly way drive_del works, we need a way to
hide a BlockBackend, just like bdrv_make_anon().  To emphasize its
"special" status, give the function a suitably off-putting name:
blk_hide_on_behalf_of_do_drive_del().  Unfortunately, hiding turns the
BlockBackend's name into the empty string.  Can't avoid that without
breaking the blk->bs->device_name equals blk->name invariant.

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


  Commit: 18e46a033d67060c1430740cf8084b702955ae8f
      
https://github.com/qemu/qemu/commit/18e46a033d67060c1430740cf8084b702955ae8f
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

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

  Log Message:
  -----------
  block: Connect BlockBackend and DriveInfo

Make the BlockBackend own the DriveInfo.  Change blockdev_init() to
return the BlockBackend instead of the DriveInfo.

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


  Commit: 8fb3c76c949f34f29c5252ee339fbe1cbfcc3234
      
https://github.com/qemu/qemu/commit/8fb3c76c949f34f29c5252ee339fbe1cbfcc3234
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/block-backend.c
    M blockdev.c
    M include/sysemu/blockdev.h
    M stubs/Makefile.objs
    R stubs/blockdev.c

  Log Message:
  -----------
  block: Code motion to get rid of stubs/blockdev.c

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9ba10c95a4a63ef453893ba16bf1c8e11a1d3c39
      
https://github.com/qemu/qemu/commit/9ba10c95a4a63ef453893ba16bf1c8e11a1d3c39
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/block-backend.c
    M blockdev.c
    M hw/block/xen_disk.c
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c

  Log Message:
  -----------
  block: Make BlockBackend own its BlockDriverState

On BlockBackend destruction, unref its BlockDriverState.  Replaces the
callers' unrefs.

This turns the pointer from BlockBackend to BlockDriverState into a
strong reference, managed with bdrv_ref() / bdrv_unref().  The
back-pointer remains weak.

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


  Commit: b9fe8a7a12f18adebba5616a3e9f44143a78c07e
      
https://github.com/qemu/qemu/commit/b9fe8a7a12f18adebba5616a3e9f44143a78c07e
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M blockdev.c
    M device-hotplug.c
    M hw/ide/piix.c
    M include/sysemu/blockdev.h

  Log Message:
  -----------
  blockdev: Eliminate drive_del()

drive_del() has become a trivial wrapper around blk_unref().  Get rid
of it.

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


  Commit: fea68bb6e9fa65c7cc6caa6adda810d1d0fdbde4
      
https://github.com/qemu/qemu/commit/fea68bb6e9fa65c7cc6caa6adda810d1d0fdbde4
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block-migration.c
    M block.c
    M blockdev.c
    M include/block/block.h
    M monitor.c

  Log Message:
  -----------
  block: Eliminate bdrv_iterate(), use bdrv_next()

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bfb197e0d998bea8741c65492b2b42f443729249
      
https://github.com/qemu/qemu/commit/bfb197e0d998bea8741c65492b2b42f443729249
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block-migration.c
    M block.c
    M block/mirror.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M blockjob.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Eliminate BlockDriverState member device_name[]

device_name[] can become non-empty only in bdrv_new_root() and
bdrv_move_feature_fields().  The latter is used only to undo damage
done by bdrv_swap().  The former is called only by blk_new_with_bs().
Therefore, when a BlockDriverState's device_name[] is non-empty, then
it's been created with a BlockBackend, and vice versa.  Furthermore,
blk_new_with_bs() keeps the two names equal.

Therefore, device_name[] is redundant.  Eliminate it.

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


  Commit: 7f06d47eff9d26cca87855273f20786502f8c57e
      
https://github.com/qemu/qemu/commit/7f06d47eff9d26cca87855273f20786502f8c57e
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

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

  Log Message:
  -----------
  block: Merge BlockBackend and BlockDriverState name spaces

BlockBackend's name space is separate only to keep the initial patches
simple.  Time to merge the two.

Retain bdrv_find() and bdrv_get_device_name() for now, to keep this
series manageable.

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


  Commit: fa1d36df7466ebbef0331b79d0ce3c5e140695c9
      
https://github.com/qemu/qemu/commit/fa1d36df7466ebbef0331b79d0ce3c5e140695c9
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M blockdev.c
    M hw/arm/collie.c
    M hw/arm/gumstix.c
    M hw/arm/mainstone.c
    M hw/arm/musicpal.c
    M hw/arm/nseries.c
    M hw/arm/omap1.c
    M hw/arm/omap2.c
    M hw/arm/omap_sx1.c
    M hw/arm/pxa2xx.c
    M hw/arm/spitz.c
    M hw/arm/versatilepb.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/xilinx_zynq.c
    M hw/arm/z2.c
    M hw/block/fdc.c
    M hw/block/m25p80.c
    M hw/block/xen_disk.c
    M hw/cris/axis_dev88.c
    M hw/display/tc6393xb.c
    M hw/i386/pc_sysfw.c
    M hw/ide/piix.c
    M hw/ide/qdev.c
    M hw/isa/pc87312.c
    M hw/lm32/lm32_boards.c
    M hw/lm32/milkymist.c
    M hw/microblaze/petalogix_ml605_mmu.c
    M hw/microblaze/petalogix_s3adsp1800_mmu.c
    M hw/mips/mips_malta.c
    M hw/mips/mips_r4k.c
    M hw/pci/pci-hotplug-old.c
    M hw/ppc/ppc405_boards.c
    M hw/ppc/spapr.c
    M hw/ppc/virtex_ml507.c
    M hw/scsi/scsi-bus.c
    M hw/sd/milkymist-memcard.c
    M hw/sd/pl181.c
    M hw/sd/sdhci.c
    M hw/sd/ssi-sd.c
    M hw/sh4/r2d.c
    M hw/usb/dev-storage.c
    M hw/xtensa/xtfpga.c
    M include/sysemu/blockdev.h

  Log Message:
  -----------
  block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

The patch is big, but all it really does is replacing

    dinfo->bdrv

by

    blk_bs(blk_by_legacy_dinfo(dinfo))

The replacement is repetitive, but the conversion of device models to
BlockBackend is imminent, and will shorten it to just
blk_legacy_dinfo(dinfo).

Line wrapping muddies the waters a bit.  I also omit tests whether
dinfo->bdrv is null, because it never is.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7c84b1b8310cd634825c77d45b4db89bb44c5cee
      
https://github.com/qemu/qemu/commit/7c84b1b8310cd634825c77d45b4db89bb44c5cee
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block-migration.c
    M block.c
    M block/archipelago.c
    M block/blkdebug.c
    M block/blkverify.c
    M block/curl.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/null.c
    M block/qed.c
    M block/qed.h
    M block/quorum.c
    M block/raw-aio.h
    M block/raw-posix.c
    M block/raw-win32.c
    M block/raw_bsd.c
    M block/rbd.c
    M block/sheepdog.c
    M block/win32-aio.c
    M dma-helpers.c
    M docs/blkdebug.txt
    M hw/block/nvme.h
    M hw/ide/ahci.h
    M hw/ide/core.c
    M hw/ide/internal.h
    M hw/ppc/mac.h
    M include/block/aio.h
    M include/block/block.h
    M include/block/block_int.h
    M include/block/thread-pool.h
    M include/hw/scsi/scsi.h
    M include/sysemu/dma.h
    M tests/test-thread-pool.c
    M thread-pool.c

  Log Message:
  -----------
  block: Rename BlockDriverAIOCB* to BlockAIOCB*

I'll use BlockDriverAIOCB with block backends shortly, and the name is
going to fit badly there.  It's a block layer thing anyway, not just a
block driver thing.

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


  Commit: 097310b53e9d498ef8e127d52ea57905cbe46ec5
      
https://github.com/qemu/qemu/commit/097310b53e9d498ef8e127d52ea57905cbe46ec5
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block.c
    M block/archipelago.c
    M block/backup.c
    M block/blkdebug.c
    M block/blkverify.c
    M block/commit.c
    M block/curl.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/mirror.c
    M block/null.c
    M block/qed-gencb.c
    M block/qed-table.c
    M block/qed.c
    M block/qed.h
    M block/quorum.c
    M block/raw-aio.h
    M block/raw-posix.c
    M block/raw-win32.c
    M block/raw_bsd.c
    M block/rbd.c
    M block/stream.c
    M block/win32-aio.c
    M blockjob.c
    M dma-helpers.c
    M docs/blkdebug.txt
    M hw/ide/ahci.c
    M hw/ide/core.c
    M hw/ide/internal.h
    M hw/ide/macio.c
    M hw/ide/pci.c
    M hw/ide/pci.h
    M hw/scsi/scsi-generic.c
    M include/block/aio.h
    M include/block/block.h
    M include/block/block_int.h
    M include/block/blockjob.h
    M include/block/thread-pool.h
    M include/monitor/monitor.h
    M include/sysemu/dma.h
    M monitor.c
    M thread-pool.c

  Log Message:
  -----------
  block: Rename BlockDriverCompletionFunc to BlockCompletionFunc

I'll use it with block backends shortly, and the name is going to fit
badly there.  It's a block layer thing anyway, not just a block driver
thing.

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


  Commit: f75167313c8b7c7c46319b54210a66e7864b88c4
      
https://github.com/qemu/qemu/commit/f75167313c8b7c7c46319b54210a66e7864b88c4
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M hw/block/virtio-blk.c
    M include/hw/virtio/virtio-blk.h

  Log Message:
  -----------
  virtio-blk: Drop redundant VirtIOBlock member conf

Commit 12c5674 turned it into a pointer to member blk.conf.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2a30307f709e6a395d23cf94837e9aae15f8e8fa
      
https://github.com/qemu/qemu/commit/2a30307f709e6a395d23cf94837e9aae15f8e8fa
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

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

  Log Message:
  -----------
  virtio-blk: Rename VirtIOBlkConf variables to conf

This is consistent with how VirtIOFOOConf variables are named
elsewhere, and makes blk available for BlockBackend variables.

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


  Commit: 4be746345f13e99e468c60acbd3a355e8183e3ce
      
https://github.com/qemu/qemu/commit/4be746345f13e99e468c60acbd3a355e8183e3ce
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/block-backend.c
    M blockdev.c
    M dma-helpers.c
    M hw/arm/collie.c
    M hw/arm/gumstix.c
    M hw/arm/highbank.c
    M hw/arm/mainstone.c
    M hw/arm/musicpal.c
    M hw/arm/nseries.c
    M hw/arm/omap1.c
    M hw/arm/omap2.c
    M hw/arm/omap_sx1.c
    M hw/arm/pxa2xx.c
    M hw/arm/realview.c
    M hw/arm/spitz.c
    M hw/arm/tosa.c
    M hw/arm/versatilepb.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/xilinx_zynq.c
    M hw/arm/z2.c
    M hw/block/block.c
    M hw/block/dataplane/virtio-blk.c
    M hw/block/fdc.c
    M hw/block/hd-geometry.c
    M hw/block/m25p80.c
    M hw/block/nand.c
    M hw/block/nvme.c
    M hw/block/onenand.c
    M hw/block/pflash_cfi01.c
    M hw/block/pflash_cfi02.c
    M hw/block/virtio-blk.c
    M hw/block/xen_disk.c
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M hw/cris/axis_dev88.c
    M hw/display/tc6393xb.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_sysfw.c
    M hw/i386/xen/xen_platform.c
    M hw/ide/ahci.c
    M hw/ide/atapi.c
    M hw/ide/cmd646.c
    M hw/ide/core.c
    M hw/ide/ich.c
    M hw/ide/internal.h
    M hw/ide/isa.c
    M hw/ide/macio.c
    M hw/ide/microdrive.c
    M hw/ide/mmio.c
    M hw/ide/pci.c
    M hw/ide/piix.c
    M hw/ide/qdev.c
    M hw/ide/via.c
    M hw/isa/pc87312.c
    M hw/lm32/lm32_boards.c
    M hw/lm32/milkymist.c
    M hw/microblaze/petalogix_ml605_mmu.c
    M hw/microblaze/petalogix_s3adsp1800_mmu.c
    M hw/mips/mips_fulong2e.c
    M hw/mips/mips_jazz.c
    M hw/mips/mips_malta.c
    M hw/mips/mips_r4k.c
    M hw/nvram/spapr_nvram.c
    M hw/pci/pci-hotplug-old.c
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/ppc405_boards.c
    M hw/ppc/prep.c
    M hw/ppc/spapr.c
    M hw/ppc/virtex_ml507.c
    M hw/s390x/s390-virtio-bus.c
    M hw/s390x/s390-virtio.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/megasas.c
    M hw/scsi/scsi-bus.c
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M hw/scsi/virtio-scsi-dataplane.c
    M hw/scsi/virtio-scsi.c
    M hw/sd/milkymist-memcard.c
    M hw/sd/omap_mmc.c
    M hw/sd/pl181.c
    M hw/sd/pxa2xx_mmci.c
    M hw/sd/sd.c
    M hw/sd/sdhci.c
    M hw/sd/ssi-sd.c
    M hw/sh4/r2d.c
    M hw/sparc/sun4m.c
    M hw/sparc64/sun4u.c
    M hw/tpm/tpm_tis.c
    M hw/tricore/tricore_testboard.c
    M hw/usb/dev-storage.c
    M hw/virtio/virtio-pci.c
    M hw/xen/xen_devconfig.c
    M hw/xenpv/xen_machine_pv.c
    M hw/xtensa/xtfpga.c
    M include/hw/arm/omap.h
    M include/hw/arm/pxa.h
    M include/hw/block/block.h
    M include/hw/block/flash.h
    M include/hw/qdev-properties.h
    M include/hw/scsi/scsi.h
    M include/hw/sd.h
    M include/hw/virtio/virtio-blk.h
    M include/sysemu/block-backend.h
    M include/sysemu/blockdev.h
    M include/sysemu/dma.h
    M trace-events

  Log Message:
  -----------
  hw: Convert from BlockDriverState to BlockBackend, mostly

Device models should access their block backends only through the
block-backend.h API.  Convert them, and drop direct includes of
inappropriate headers.

Just four uses of BlockDriverState are left:

* The Xen paravirtual block device backend (xen_disk.c) opens images
  itself when set up via xenbus, bypassing blockdev.c.  I figure it
  should go through qmp_blockdev_add() instead.

* Device model "usb-storage" prompts for keys.  No other device model
  does, and this one probably shouldn't do it, either.

* ide_issue_trim_cb() uses bdrv_aio_discard() instead of
  blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
  which has only the BlockDriverState.

* PC87312State has an unused BlockDriverState[] member.

The next two commits take care of the latter two.

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


  Commit: a987ee1f1b49529850207057f600618205496c60
      
https://github.com/qemu/qemu/commit/a987ee1f1b49529850207057f600618205496c60
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M hw/ide/core.c

  Log Message:
  -----------
  ide: Complete conversion from BlockDriverState to BlockBackend

Add a BlockBackend member to TrimAIOCB, so ide_issue_trim_cb() can use
blk_aio_discard() instead of bdrv_aio_discard().

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


  Commit: b8864be5f30d6c1c73208215c65c3e3a3b5a5b04
      
https://github.com/qemu/qemu/commit/b8864be5f30d6c1c73208215c65c3e3a3b5a5b04
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M include/hw/isa/pc87312.h

  Log Message:
  -----------
  pc87312: Drop unused members of PC87312State

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d3aeb1b7dadacabd175efd515c7c52642141be87
      
https://github.com/qemu/qemu/commit/d3aeb1b7dadacabd175efd515c7c52642141be87
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

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

  Log Message:
  -----------
  blockdev: Drop superfluous DriveInfo member id

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 26f8b3a84750546342d4397f86efb1ea7798d5dd
      
https://github.com/qemu/qemu/commit/26f8b3a84750546342d4397f86efb1ea7798d5dd
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/block-backend.c
    M blockdev.c
    M hw/block/block.c
    M hw/ide/qdev.c
    M hw/scsi/scsi-disk.c
    M include/sysemu/blockdev.h

  Log Message:
  -----------
  blockdev: Fix blockdev-add not to create DriveInfo

blockdev_init() always creates a DriveInfo, but only drive_new() fills
it in.  qmp_blockdev_add() leaves it blank.  This results in a drive
with type = IF_IDE, bus = 0, unit = 0.  Screwed up in commit ee13ed1c.

Board initialization code looking for IDE drive (0,0) can pick up one
of these bogus drives.  The QMP command has to execute really early to
be visible.  Not sure how likely that is in practice.

Fix by creating DriveInfo in drive_new().  Block backends created by
blockdev-add don't get one.

Breaks the test for "has been created by qmp_blockdev_add()" in
blockdev_mark_auto_del() and do_drive_del(), because it changes the
value of dinfo && !dinfo->enable_auto_del from true to false.  Simply
test !dinfo instead.

Leaves DriveInfo member enable_auto_del unused.  Drop it.

A few places assume a block backend always has a DriveInfo.  Fix them
up.

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


  Commit: d829a2115f0817993e2b683601cb544a27980a8f
      
https://github.com/qemu/qemu/commit/d829a2115f0817993e2b683601cb544a27980a8f
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/qapi.c
    M include/block/qapi.h

  Log Message:
  -----------
  block/qapi: Convert qmp_query_block() to BlockBackend

Much more command code needs conversion.  I start with this one
because it's using bdrv_dev_* functions, which I'm about to lift into
BlockBackend.

While there, give bdrv_query_info() internal linkage.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6007cdd448b6729e82530e85579e5089ddc58eba
      
https://github.com/qemu/qemu/commit/6007cdd448b6729e82530e85579e5089ddc58eba
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend

Much more command code needs conversion.  I'm converting these now
because they're using bdrv_dev_* functions, which I'm about to lift
into BlockBackend.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a7f53e26a6f5bd64cda617cbcca118601d9a01d9
      
https://github.com/qemu/qemu/commit/a7f53e26a6f5bd64cda617cbcca118601d9a01d9
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

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

  Log Message:
  -----------
  block: Lift device model API into BlockBackend

Move device model attachment / detachment and the BlockDevOps device
model callbacks and their wrappers from BlockDriverState to
BlockBackend.

Wrapper calls in block.c change from

    bdrv_dev_FOO_cb(bs, ...)

to

    if (bs->blk) {
  bdrv_dev_FOO_cb(bs->blk, ...);
    }

No change, because both bdrv_dev_change_media_cb() and
bdrv_dev_resize_cb() do nothing when no device model is attached, and
a device model can be attached only when bs->blk.

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


  Commit: 84ebe3755f88be4c3733e997641fafd050a58810
      
https://github.com/qemu/qemu/commit/84ebe3755f88be4c3733e997641fafd050a58810
  Author: Markus Armbruster <address@hidden>
  Date:   2014-10-20 (Mon, 20 Oct 2014)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block: Make device model's references to BlockBackend strong

Doesn't make a difference just yet, but it's the right thing to do.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4277af19d93b227dc439b7f059672b16614524f3
      
https://github.com/qemu/qemu/commit/4277af19d93b227dc439b7f059672b16614524f3
  Author: Cornelia Huck <address@hidden>
  Date:   2014-10-21 (Tue, 21 Oct 2014)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  s390x: sweep up unmaintained files

Several s390x/kvm/ccw related files don't have an entry in MAINTAINERS:
Sort them into the appropriate sections.

Acked-by: Christian Borntraeger <address@hidden>
Reviewed-by: Alexander Graf <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 8f4699d873bef81cec95db6da53d4c33f8caf4b9
      
https://github.com/qemu/qemu/commit/8f4699d873bef81cec95db6da53d4c33f8caf4b9
  Author: Peter Maydell <address@hidden>
  Date:   2014-10-22 (Wed, 22 Oct 2014)

  Changed paths:
    M block-migration.c
    M block.c
    M block/Makefile.objs
    M block/archipelago.c
    M block/backup.c
    M block/blkdebug.c
    M block/blkverify.c
    A block/block-backend.c
    M block/commit.c
    M block/curl.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/mirror.c
    M block/nbd.c
    M block/null.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qed-gencb.c
    M block/qed-table.c
    M block/qed.c
    M block/qed.h
    M block/quorum.c
    M block/raw-aio.h
    M block/raw-posix.c
    M block/raw-win32.c
    M block/raw_bsd.c
    M block/rbd.c
    M block/sheepdog.c
    M block/stream.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M block/win32-aio.c
    M blockdev.c
    M blockjob.c
    M device-hotplug.c
    M dma-helpers.c
    M docs/blkdebug.txt
    M hw/arm/collie.c
    M hw/arm/gumstix.c
    M hw/arm/highbank.c
    M hw/arm/mainstone.c
    M hw/arm/musicpal.c
    M hw/arm/nseries.c
    M hw/arm/omap1.c
    M hw/arm/omap2.c
    M hw/arm/omap_sx1.c
    M hw/arm/pxa2xx.c
    M hw/arm/realview.c
    M hw/arm/spitz.c
    M hw/arm/tosa.c
    M hw/arm/versatilepb.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/xilinx_zynq.c
    M hw/arm/z2.c
    M hw/block/block.c
    M hw/block/dataplane/virtio-blk.c
    M hw/block/dataplane/virtio-blk.h
    M hw/block/fdc.c
    M hw/block/hd-geometry.c
    M hw/block/m25p80.c
    M hw/block/nand.c
    M hw/block/nvme.c
    M hw/block/nvme.h
    M hw/block/onenand.c
    M hw/block/pflash_cfi01.c
    M hw/block/pflash_cfi02.c
    M hw/block/virtio-blk.c
    M hw/block/xen_disk.c
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M hw/cris/axis_dev88.c
    M hw/display/tc6393xb.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_sysfw.c
    M hw/i386/xen/xen_platform.c
    M hw/ide/ahci.c
    M hw/ide/ahci.h
    M hw/ide/atapi.c
    M hw/ide/cmd646.c
    M hw/ide/core.c
    M hw/ide/ich.c
    M hw/ide/internal.h
    M hw/ide/isa.c
    M hw/ide/macio.c
    M hw/ide/microdrive.c
    M hw/ide/mmio.c
    M hw/ide/pci.c
    M hw/ide/pci.h
    M hw/ide/piix.c
    M hw/ide/qdev.c
    M hw/ide/via.c
    M hw/isa/pc87312.c
    M hw/lm32/lm32_boards.c
    M hw/lm32/milkymist.c
    M hw/microblaze/petalogix_ml605_mmu.c
    M hw/microblaze/petalogix_s3adsp1800_mmu.c
    M hw/mips/mips_fulong2e.c
    M hw/mips/mips_jazz.c
    M hw/mips/mips_malta.c
    M hw/mips/mips_r4k.c
    M hw/nvram/spapr_nvram.c
    M hw/pci/pci-hotplug-old.c
    M hw/ppc/mac.h
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/ppc405_boards.c
    M hw/ppc/prep.c
    M hw/ppc/spapr.c
    M hw/ppc/virtex_ml507.c
    M hw/s390x/s390-virtio-bus.c
    M hw/s390x/s390-virtio.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/megasas.c
    M hw/scsi/scsi-bus.c
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M hw/scsi/virtio-scsi-dataplane.c
    M hw/scsi/virtio-scsi.c
    M hw/sd/milkymist-memcard.c
    M hw/sd/omap_mmc.c
    M hw/sd/pl181.c
    M hw/sd/pxa2xx_mmci.c
    M hw/sd/sd.c
    M hw/sd/sdhci.c
    M hw/sd/ssi-sd.c
    M hw/sh4/r2d.c
    M hw/sparc/sun4m.c
    M hw/sparc64/sun4u.c
    M hw/tpm/tpm_tis.c
    M hw/tricore/tricore_testboard.c
    M hw/usb/dev-storage.c
    M hw/virtio/virtio-pci.c
    M hw/xen/xen_devconfig.c
    M hw/xenpv/xen_machine_pv.c
    M hw/xtensa/xtfpga.c
    M include/block/aio.h
    M include/block/block.h
    M include/block/block_int.h
    M include/block/blockjob.h
    M include/block/qapi.h
    M include/block/thread-pool.h
    M include/hw/arm/omap.h
    M include/hw/arm/pxa.h
    M include/hw/block/block.h
    M include/hw/block/flash.h
    M include/hw/isa/pc87312.h
    M include/hw/qdev-properties.h
    M include/hw/scsi/scsi.h
    M include/hw/sd.h
    M include/hw/virtio/virtio-blk.h
    M include/monitor/monitor.h
    M include/qemu/typedefs.h
    A include/sysemu/block-backend.h
    M include/sysemu/blockdev.h
    M include/sysemu/dma.h
    M monitor.c
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c
    M stubs/Makefile.objs
    R stubs/blockdev.c
    M tests/test-thread-pool.c
    M thread-pool.c
    M trace-events

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

Block patches

# gpg: Signature made Mon 20 Oct 2014 13:04:09 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream: (28 commits)
  block: Make device model's references to BlockBackend strong
  block: Lift device model API into BlockBackend
  blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend
  block/qapi: Convert qmp_query_block() to BlockBackend
  blockdev: Fix blockdev-add not to create DriveInfo
  blockdev: Drop superfluous DriveInfo member id
  pc87312: Drop unused members of PC87312State
  ide: Complete conversion from BlockDriverState to BlockBackend
  hw: Convert from BlockDriverState to BlockBackend, mostly
  virtio-blk: Rename VirtIOBlkConf variables to conf
  virtio-blk: Drop redundant VirtIOBlock member conf
  block: Rename BlockDriverCompletionFunc to BlockCompletionFunc
  block: Rename BlockDriverAIOCB* to BlockAIOCB*
  block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()
  block: Merge BlockBackend and BlockDriverState name spaces
  block: Eliminate BlockDriverState member device_name[]
  block: Eliminate bdrv_iterate(), use bdrv_next()
  blockdev: Eliminate drive_del()
  block: Make BlockBackend own its BlockDriverState
  block: Code motion to get rid of stubs/blockdev.c
  ...

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


  Commit: 60b6381ffb4fa444b500cbb4a0c832c4bfb7ba89
      
https://github.com/qemu/qemu/commit/60b6381ffb4fa444b500cbb4a0c832c4bfb7ba89
  Author: Peter Maydell <address@hidden>
  Date:   2014-10-22 (Wed, 22 Oct 2014)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20141021' into staging

add missing s390x files to MAINTAINERS

# gpg: Signature made Tue 21 Oct 2014 11:57:12 BST using RSA key ID C6F02FAF
# gpg: Good signature from "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"

* remotes/cohuck/tags/s390x-20141021:
  s390x: sweep up unmaintained files

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


Compare: https://github.com/qemu/qemu/compare/895b810c1220...60b6381ffb4f

reply via email to

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