[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v5 09/38] block: Invoke change media CB before N
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v5 09/38] block: Invoke change media CB before NULLing drv |
Date: |
Fri, 18 Sep 2015 10:22:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/18/2015 09:22 AM, Max Reitz wrote:
> 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 0 for
Stale comment - you just fixed bdrv_is_inserted() to return false rather
than 0 in commit 5/38.
> 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>
> ---
> block.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
R-b still stands.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH v5 02/38] block: Set BDRV_O_INCOMING in bdrv_fill_options(), (continued)
- [Qemu-block] [PATCH v5 03/38] blockdev: Allow creation of BDS trees without BB, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 05/38] block: Make bdrv_is_inserted() return a bool, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 06/38] block: Add blk_is_available(), Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 04/38] iotests: Only create BB if necessary, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 07/38] block: Make bdrv_is_inserted() recursive, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 09/38] block: Invoke change media CB before NULLing drv, Max Reitz, 2015/09/18
- Re: [Qemu-block] [PATCH v5 09/38] block: Invoke change media CB before NULLing drv,
Eric Blake <=
- [Qemu-block] [PATCH v5 08/38] block/raw_bsd: Drop raw_is_inserted(), Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 10/38] hw/block/fdc: Implement tray status, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 11/38] hw/usb-storage: Check whether BB is inserted, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 12/38] block: Fix BB AIOCB AioContext without BDS, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 13/38] block: Move guest_block_size into BlockBackend, Max Reitz, 2015/09/18
- [Qemu-block] [PATCH v5 14/38] block: Remove wr_highest_sector from BlockAcctStats, Max Reitz, 2015/09/18