[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 21/42] block: Use CAFs for debug breakpoints
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v6 21/42] block: Use CAFs for debug breakpoints |
Date: |
Fri, 9 Aug 2019 18:13:46 +0200 |
When looking for a blkdebug node (which implements debug breakpoints),
use bdrv_primary_bs() to iterate through the graph, because that is
where a blkdebug node would be.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
block.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index a467b175c6..1070aa1ba9 100644
--- a/block.c
+++ b/block.c
@@ -5218,7 +5218,7 @@ int bdrv_debug_breakpoint(BlockDriverState *bs, const
char *event,
const char *tag)
{
while (bs && bs->drv && !bs->drv->bdrv_debug_breakpoint) {
- bs = bs->file ? bs->file->bs : NULL;
+ bs = bdrv_primary_bs(bs);
}
if (bs && bs->drv && bs->drv->bdrv_debug_breakpoint) {
@@ -5231,7 +5231,7 @@ int bdrv_debug_breakpoint(BlockDriverState *bs, const
char *event,
int bdrv_debug_remove_breakpoint(BlockDriverState *bs, const char *tag)
{
while (bs && bs->drv && !bs->drv->bdrv_debug_remove_breakpoint) {
- bs = bs->file ? bs->file->bs : NULL;
+ bs = bdrv_primary_bs(bs);
}
if (bs && bs->drv && bs->drv->bdrv_debug_remove_breakpoint) {
@@ -5244,7 +5244,7 @@ int bdrv_debug_remove_breakpoint(BlockDriverState *bs,
const char *tag)
int bdrv_debug_resume(BlockDriverState *bs, const char *tag)
{
while (bs && (!bs->drv || !bs->drv->bdrv_debug_resume)) {
- bs = bs->file ? bs->file->bs : NULL;
+ bs = bdrv_primary_bs(bs);
}
if (bs && bs->drv && bs->drv->bdrv_debug_resume) {
@@ -5257,7 +5257,7 @@ int bdrv_debug_resume(BlockDriverState *bs, const char
*tag)
bool bdrv_debug_is_suspended(BlockDriverState *bs, const char *tag)
{
while (bs && bs->drv && !bs->drv->bdrv_debug_is_suspended) {
- bs = bs->file ? bs->file->bs : NULL;
+ bs = bdrv_primary_bs(bs);
}
if (bs && bs->drv && bs->drv->bdrv_debug_is_suspended) {
--
2.21.0
- [Qemu-devel] [PATCH v6 16/42] block: Flush all children in generic code, (continued)
- [Qemu-devel] [PATCH v6 16/42] block: Flush all children in generic code, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 17/42] block: Use CAFs in bdrv_refresh_limits(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 18/42] block: Use CAFs in bdrv_refresh_filename(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 19/42] block: Use CAF in bdrv_co_rw_vmstate(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 20/42] block/snapshot: Fix fallback, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 21/42] block: Use CAFs for debug breakpoints,
Max Reitz <=
- [Qemu-devel] [PATCH v6 22/42] block: Fix bdrv_get_allocated_file_size's fallback, Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 23/42] blockdev: Use CAF in external_snapshot_prepare(), Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 24/42] block: Use child access functions for QAPI queries, Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 26/42] backup: Deal with filters, Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 25/42] mirror: Deal with filters, Max Reitz, 2019/08/09