block.c (c7a0f2be8f95b220cdadbba9a9236eaf115951dc) block.c (30dd65f307b647eef8156c4a33bd007823ef85cb)
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

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

4360 uint64_t perm = 0, shared = BLK_PERM_ALL;
4361 int ret;
4362
4363 /* Make sure that @from doesn't go away until we have successfully attached
4364 * all of its parents to @to. */
4365 bdrv_ref(from);
4366
4367 assert(qemu_get_current_aio_context() == qemu_get_aio_context());
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

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

4360 uint64_t perm = 0, shared = BLK_PERM_ALL;
4361 int ret;
4362
4363 /* Make sure that @from doesn't go away until we have successfully attached
4364 * all of its parents to @to. */
4365 bdrv_ref(from);
4366
4367 assert(qemu_get_current_aio_context() == qemu_get_aio_context());
4368 assert(bdrv_get_aio_context(from) == bdrv_get_aio_context(to));
4368 bdrv_drained_begin(from);
4369
4370 /* Put all parents into @list and calculate their cumulative permissions */
4371 QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) {
4372 assert(c->bs == from);
4373 if (!should_update_child(c, to)) {
4374 continue;
4375 }

--- 2383 unchanged lines hidden ---
4369 bdrv_drained_begin(from);
4370
4371 /* Put all parents into @list and calculate their cumulative permissions */
4372 QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) {
4373 assert(c->bs == from);
4374 if (!should_update_child(c, to)) {
4375 continue;
4376 }

--- 2383 unchanged lines hidden ---