[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available()
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available() |
Date: |
Tue, 27 Jan 2015 12:15:51 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 01/26/2015 09:02 AM, Max Reitz wrote:
> 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>
> ---
> block/block-backend.c | 7 ++++++-
> include/sysemu/block-backend.h | 1 +
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> +++ b/include/sysemu/block-backend.h
> @@ -127,6 +127,7 @@ int blk_enable_write_cache(BlockBackend *blk);
> void blk_set_enable_write_cache(BlockBackend *blk, bool wce);
> void blk_invalidate_cache(BlockBackend *blk, Error **errp);
> int blk_is_inserted(BlockBackend *blk);
Should we change blk_is_inserted to return bool?
> +bool blk_is_available(BlockBackend *blk);
Looks reasonable.
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
- [Qemu-devel] [PATCH 01/50] blockdev: Allow creation of BDS trees without BB, (continued)
- [Qemu-devel] [PATCH 01/50] blockdev: Allow creation of BDS trees without BB, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 03/50] hw/block/fdc: Implement tray status, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 02/50] iotests: Only create BB if necessary, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 13/50] block: Add BlockBackendRootState, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 14/50] block: Make some BB functions fall back to BBRS, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 06/50] block: Add blk_is_available(), Max Reitz, 2015/01/26
- Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available(),
Eric Blake <=
- [Qemu-devel] [PATCH 12/50] block: Move I/O status and error actions into BB, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 11/50] block: Move BlockAcctStats into BlockBackend, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 07/50] block: Make bdrv_is_inserted() recursive, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 09/50] block: Move guest_block_size into BlockBackend, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 20/50] blockdev: Check blk_is_available() in sn-del-int-sync, Max Reitz, 2015/01/26