qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] BlockBackend next steps


From: Markus Armbruster
Subject: [Qemu-devel] BlockBackend next steps
Date: Thu, 23 Oct 2014 14:16:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

"Need BlockBackend" has been a recurring theme for a long time.  It's
finally on master now.  Plenty of work left to do.  Let's coordinate
next steps to avoid duplicate work.

A few obvious tasks:

* Complete monitor command conversion

  Commands deal with complete backends and with individual nodes or
  sub-trees.  The former need conversion from BlockDriverState to
  BlockBackend.

  Done: qmp_query_block(), qmp_eject(), qmp_change_blockdev().

  Can be done command by command.  Some command conversions depend on
  other conversions.

* Complete utility program conversion (qemu-img qemu-io qemu-nbd)

  Done: BB creation and destruction.

  To be done: actual use.  Can be done program by program.

* Convert internal NBD server

* Convert block migration

* Convert block jobs

  We want to divorce jobs from the block layer, but since that'll
  probably take a while, lift them for now.

* Convert any other users outside the block subsystem

* Lift backend stuff from BDS into BB

  Lift one group of related members at a time.

  A good starting point is bdrv_move_feature_fields().  Examine the
  stuff it moves group by group.  Either move it, or add a comment
  explaining why it should stay.

* Review use of bdrv_get_device_name()

  Some uses might want the node-name instead.

  Double-checking blk_name() use wouldn't hurt.

* Monitor command blockdev-del

  Fail when reference count > 1.

* Monitor commands to force reference count down to 1

  Sometimes, you want to stop using an image, so you can use it for
  something else, e.g. another VM.

  To do that, you need to make its users give up their reference: unplug
  device model, complete block job, unexport from internal NBD server,
  ...

  Need to review everything in QEMU proper that can hold a reference,
  and make sure there's a way to make it drop the reference.

  Known complications:

  * The only way to unexport seems to be stopping the NBD server
    outright.
  
  * When a device model is not pluggable, or refuses to unplug, we need
    to fence it.  The current way to do that is drive_del, which is
    badly designed, needs to be replaced.

  Depends on conversions.

* Get rid of "empty" BDS

  Now: and empty backend is represented as BB with BDS that has a null
  driver.

  Wanted: represented as BB without BDS.

* Get rid of BDS member opaque

  Now: BDS is a concrete data type.  Block drivers use opaque to point
  to their driver-specific state.

  Wanted: BDS is an abstract base.  Block drivers extend it.

  Depends on the previous item.

If you have more, please list them.



reply via email to

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