block.c (efb4f3b62c69383a7308d7b739a3193e7c0ccae8) block.c (30c321f97fa5898a5ad71070af6ce271fbdba347)
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

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

4077}
4078
4079static void bdrv_delete(BlockDriverState *bs)
4080{
4081 assert(!bs->job);
4082 assert(bdrv_op_blocker_is_empty(bs));
4083 assert(!bs->refcnt);
4084
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

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

4077}
4078
4079static void bdrv_delete(BlockDriverState *bs)
4080{
4081 assert(!bs->job);
4082 assert(bdrv_op_blocker_is_empty(bs));
4083 assert(!bs->refcnt);
4084
4085 bdrv_close(bs);
4086
4087 /* remove from list, if necessary */
4088 if (bs->node_name[0] != '\0') {
4089 QTAILQ_REMOVE(&graph_bdrv_states, bs, node_list);
4090 }
4091 QTAILQ_REMOVE(&all_bdrv_states, bs, bs_list);
4092
4085 /* remove from list, if necessary */
4086 if (bs->node_name[0] != '\0') {
4087 QTAILQ_REMOVE(&graph_bdrv_states, bs, node_list);
4088 }
4089 QTAILQ_REMOVE(&all_bdrv_states, bs, bs_list);
4090
4091 bdrv_close(bs);
4092
4093 g_free(bs);
4094}
4095
4096/*
4097 * Run consistency checks on an image
4098 *
4099 * Returns 0 if the check could be completed (it doesn't mean that the image is
4100 * free of errors) or -errno when an internal error occurred. The results of the

--- 2130 unchanged lines hidden ---
4093 g_free(bs);
4094}
4095
4096/*
4097 * Run consistency checks on an image
4098 *
4099 * Returns 0 if the check could be completed (it doesn't mean that the image is
4100 * free of errors) or -errno when an internal error occurred. The results of the

--- 2130 unchanged lines hidden ---