[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 05/13] block: Move BDS close notifiers into B
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v5 05/13] block: Move BDS close notifiers into BB |
Date: |
Thu, 19 Mar 2015 12:17:26 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 03/03/2015 01:13 PM, Max Reitz wrote:
> The only remaining user of the BDS close notifiers is NBD which uses
> them to determine when a BDS tree is being ejected. This patch removes
> the BDS-level close notifiers and adds a notifier list to the
> BlockBackend structure that is invoked whenever a BDS is removed.
>
> Symmetrically to that, another notifier list is added that is invoked
> whenever a BDS is inserted. The dataplane implementations for virtio-blk
> and virtio-scsi use both notifier types for setting up and removing op
> blockers. This is not only important for setting up the op blockers on
> insertion, but also for removing them on ejection since bdrv_delete()
> asserts that there are no op blockers set up.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block.c | 7 ----
> block/block-backend.c | 19 +++++++---
> blockdev-nbd.c | 36 +------------------
> hw/block/dataplane/virtio-blk.c | 77
> +++++++++++++++++++++++++++++++----------
> hw/scsi/virtio-scsi.c | 59 +++++++++++++++++++++++++++++++
> include/block/block.h | 1 -
> include/block/block_int.h | 2 --
> include/hw/virtio/virtio-scsi.h | 10 ++++++
> include/sysemu/block-backend.h | 3 +-
> nbd.c | 13 +++++++
> 10 files changed, 159 insertions(+), 68 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v5 03/13] iotests: Add test for eject under NBD server, (continued)
- [Qemu-devel] [PATCH v5 08/13] block: Make bdrv_close() static, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 01/13] iotests: Move _filter_nbd into common.filter, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 02/13] iotests: Make redirecting qemu's stderr optional, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 06/13] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 13/13] iotests: Add test for multiple BB on BDS tree, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 05/13] block: Move BDS close notifiers into BB, Max Reitz, 2015/03/03
- Re: [Qemu-devel] [PATCH v5 05/13] block: Move BDS close notifiers into BB,
Eric Blake <=
- [Qemu-devel] [PATCH v5 10/13] blockdev: Keep track of monitor-owned BDS, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 12/13] block: Rewrite bdrv_close_all(), Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 09/13] block: Add list of all BlockDriverStates, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 04/13] quorum: Fix close path, Max Reitz, 2015/03/03
- [Qemu-devel] [PATCH v5 11/13] block: Add blk_remove_all_bs(), Max Reitz, 2015/03/03