[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 04/47] block: bdrv_set_backing_hd() is about bs->backing
From: |
Max Reitz |
Subject: |
[PATCH v7 04/47] block: bdrv_set_backing_hd() is about bs->backing |
Date: |
Thu, 25 Jun 2020 17:21:32 +0200 |
bdrv_set_backing_hd() is a function that explicitly cares about the
bs->backing child. Highlight that in its description and use
child_bs(bs->backing) instead of backing_bs(bs) to make it more obvious.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index f3e2aae49c..d139ffb57d 100644
--- a/block.c
+++ b/block.c
@@ -2846,7 +2846,7 @@ static BdrvChildRole bdrv_backing_role(BlockDriverState
*bs)
}
/*
- * Sets the backing file link of a BDS. A new reference is created; callers
+ * Sets the bs->backing link of a BDS. A new reference is created; callers
* which don't need their own reference any more must call bdrv_unref().
*/
void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
@@ -2855,7 +2855,7 @@ void bdrv_set_backing_hd(BlockDriverState *bs,
BlockDriverState *backing_hd,
bool update_inherits_from = bdrv_chain_contains(bs, backing_hd) &&
bdrv_inherits_from_recursive(backing_hd, bs);
- if (bdrv_is_backing_chain_frozen(bs, backing_bs(bs), errp)) {
+ if (bdrv_is_backing_chain_frozen(bs, child_bs(bs->backing), errp)) {
return;
}
--
2.26.2
- [PATCH v7 00/47] block: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 01/47] block: Add child access functions, Max Reitz, 2020/06/25
- [PATCH v7 02/47] block: Add chain helper functions, Max Reitz, 2020/06/25
- [PATCH v7 03/47] block: bdrv_cow_child() for bdrv_has_zero_init(), Max Reitz, 2020/06/25
- [PATCH v7 04/47] block: bdrv_set_backing_hd() is about bs->backing,
Max Reitz <=
- [PATCH v7 06/47] block: Drop bdrv_is_encrypted(), Max Reitz, 2020/06/25
- [PATCH v7 05/47] block: Include filters when freezing backing chain, Max Reitz, 2020/06/25
- [PATCH v7 08/47] throttle: Support compressed writes, Max Reitz, 2020/06/25
- [PATCH v7 09/47] copy-on-read: Support compressed writes, Max Reitz, 2020/06/25
- [PATCH v7 07/47] block: Add bdrv_supports_compressed_writes(), Max Reitz, 2020/06/25
- [PATCH v7 10/47] mirror-top: Support compressed writes, Max Reitz, 2020/06/25
- [PATCH v7 12/47] block: Use bdrv_filter_(bs|child) where obvious, Max Reitz, 2020/06/25
- [PATCH v7 13/47] block: Use CAFs in block status functions, Max Reitz, 2020/06/25
- [PATCH v7 14/47] stream: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 11/47] backup-top: Support compressed writes, Max Reitz, 2020/06/25