block.c (d083319fe007e100b38995d0ea254845c8efa433) block.c (26de9438c1b6013532fb95de0720e2696588332f)
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 2839 unchanged lines hidden (view full) ---

2848}
2849
2850static void change_parent_backing_link(BlockDriverState *from,
2851 BlockDriverState *to)
2852{
2853 BdrvChild *c, *next, *to_c;
2854
2855 QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) {
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 2839 unchanged lines hidden (view full) ---

2848}
2849
2850static void change_parent_backing_link(BlockDriverState *from,
2851 BlockDriverState *to)
2852{
2853 BdrvChild *c, *next, *to_c;
2854
2855 QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) {
2856 if (c->role->stay_at_node) {
2857 continue;
2858 }
2856 if (c->role == &child_backing) {
2857 /* @from is generally not allowed to be a backing file, except for
2858 * when @to is the overlay. In that case, @from may not be replaced
2859 * by @to as @to's backing node. */
2860 QLIST_FOREACH(to_c, &to->children, next) {
2861 if (to_c == c) {
2862 break;
2863 }

--- 1709 unchanged lines hidden ---
2859 if (c->role == &child_backing) {
2860 /* @from is generally not allowed to be a backing file, except for
2861 * when @to is the overlay. In that case, @from may not be replaced
2862 * by @to as @to's backing node. */
2863 QLIST_FOREACH(to_c, &to->children, next) {
2864 if (to_c == c) {
2865 break;
2866 }

--- 1709 unchanged lines hidden ---