block.c (e0ce97f896ac752b734c22a6d0d1b3e1739d1158) block.c (cd7fca952ce8456955f7f4e11df9ced14204c2f1)
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

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

20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24#include "qemu/osdep.h"
25#include "trace.h"
26#include "block/block_int.h"
27#include "block/blockjob.h"
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

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

20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24#include "qemu/osdep.h"
25#include "trace.h"
26#include "block/block_int.h"
27#include "block/blockjob.h"
28#include "block/nbd.h"
28#include "qemu/error-report.h"
29#include "qemu/module.h"
30#include "qapi/qmp/qerror.h"
31#include "qapi/qmp/qbool.h"
32#include "qapi/qmp/qjson.h"
33#include "sysemu/block-backend.h"
34#include "sysemu/sysemu.h"
35#include "qemu/notify.h"

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

2201 }
2202 QLIST_INIT(&bs->aio_notifiers);
2203 bdrv_drained_end(bs);
2204}
2205
2206void bdrv_close_all(void)
2207{
2208 block_job_cancel_sync_all();
29#include "qemu/error-report.h"
30#include "qemu/module.h"
31#include "qapi/qmp/qerror.h"
32#include "qapi/qmp/qbool.h"
33#include "qapi/qmp/qjson.h"
34#include "sysemu/block-backend.h"
35#include "sysemu/sysemu.h"
36#include "qemu/notify.h"

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

2202 }
2203 QLIST_INIT(&bs->aio_notifiers);
2204 bdrv_drained_end(bs);
2205}
2206
2207void bdrv_close_all(void)
2208{
2209 block_job_cancel_sync_all();
2210 nbd_export_close_all();
2209
2210 /* Drop references from requests still in flight, such as canceled block
2211 * jobs whose AIO context has not been polled yet */
2212 bdrv_drain_all();
2213
2214 blk_remove_all_bs();
2215 blockdev_close_all_bdrv_states();
2216

--- 1705 unchanged lines hidden ---
2211
2212 /* Drop references from requests still in flight, such as canceled block
2213 * jobs whose AIO context has not been polled yet */
2214 bdrv_drain_all();
2215
2216 blk_remove_all_bs();
2217 blockdev_close_all_bdrv_states();
2218

--- 1705 unchanged lines hidden ---