[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v12 03/31] block: Skip implicit nodes for filename i
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v12 03/31] block: Skip implicit nodes for filename info |
Date: |
Mon, 17 Dec 2018 23:43:20 +0100 |
bdrv_refresh_filename() should simply skip all implicit nodes. They are
supposed to be invisible to the user, so they should not appear in
filename information.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
---
block.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/block.c b/block.c
index 6c6ccb1749..589d43e18a 100644
--- a/block.c
+++ b/block.c
@@ -5331,6 +5331,20 @@ void bdrv_refresh_filename(BlockDriverState *bs)
bdrv_refresh_filename(child->bs);
}
+ if (bs->implicit) {
+ /* For implicit nodes, just copy everything from the single child */
+ child = QLIST_FIRST(&bs->children);
+ assert(QLIST_NEXT(child, next) == NULL);
+
+ pstrcpy(bs->exact_filename, sizeof(bs->exact_filename),
+ child->bs->exact_filename);
+ pstrcpy(bs->filename, sizeof(bs->filename), child->bs->filename);
+
+ bs->full_open_options = qobject_ref(child->bs->full_open_options);
+
+ return;
+ }
+
if (drv->bdrv_refresh_filename) {
/* Obsolete information is of no use here, so drop the old file name
* information before refreshing it */
--
2.19.2
- [Qemu-devel] [PATCH v12 00/31] block: Fix some filename generation issues, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 01/31] block: Use bdrv_refresh_filename() to pull, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 02/31] block: Use children list in bdrv_refresh_filename, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 03/31] block: Skip implicit nodes for filename info,
Max Reitz <=
- [Qemu-devel] [PATCH v12 04/31] block: Add BDS.auto_backing_file, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 06/31] iotests.py: Add filter_imgfmt(), Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 05/31] block: Respect backing bs in bdrv_refresh_filename, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 07/31] iotests.py: Add node_info(), Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 09/31] block: Make path_combine() return the path, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 08/31] iotests: Add test for backing file overrides, Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 12/31] block: Add bdrv_make_absolute_filename(), Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 10/31] block: bdrv_get_full_backing_filename_from_...'s ret. val., Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 11/31] block: bdrv_get_full_backing_filename's ret. val., Max Reitz, 2018/12/17
- [Qemu-devel] [PATCH v12 13/31] block: Fix bdrv_find_backing_image(), Max Reitz, 2018/12/17