[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RESEND 18/50] block: Respect empty BB in bdrv_query_
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH RESEND 18/50] block: Respect empty BB in bdrv_query_info() |
Date: |
Tue, 27 Jan 2015 14:45:51 -0500 |
Signed-off-by: Max Reitz <address@hidden>
---
block/qapi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index 9a44d40..db42a6e 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -282,12 +282,12 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo
**p_info,
info->io_status = blk_iostatus(blk);
}
- if (!QLIST_EMPTY(&bs->dirty_bitmaps)) {
+ if (bs && !QLIST_EMPTY(&bs->dirty_bitmaps)) {
info->has_dirty_bitmaps = true;
info->dirty_bitmaps = bdrv_query_dirty_bitmaps(bs);
}
- if (bs->drv) {
+ if (bs && bs->drv) {
info->has_inserted = true;
info->inserted = bdrv_block_device_info(bs);
--
2.1.0
- [Qemu-devel] [PATCH RESEND 05/50] block: Fix BB AIOCB AioContext without BDS, (continued)
- [Qemu-devel] [PATCH RESEND 05/50] block: Fix BB AIOCB AioContext without BDS, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 06/50] block: Add blk_is_available(), Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 07/50] block: Make bdrv_is_inserted() recursive, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 02/50] iotests: Only create BB if necessary, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 08/50] block/quorum: Implement bdrv_is_inserted(), Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 11/50] block: Move BlockAcctStats into BlockBackend, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 12/50] block: Move I/O status and error actions into BB, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 09/50] block: Move guest_block_size into BlockBackend, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 18/50] block: Respect empty BB in bdrv_query_info(),
Max Reitz <=
- [Qemu-devel] [PATCH RESEND 16/50] block: Prepare remaining BB functions for NULL BDS, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 10/50] block: Remove wr_highest_offset from BlockAcctStats, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 19/50] blockdev: Use BlockBackend for blockdev-backup TA, Max Reitz, 2015/01/27
- [Qemu-devel] [PATCH RESEND 15/50] block: Fail requests to empty BlockBackend, Max Reitz, 2015/01/27