block.c (5b3639371c3e220b41cd2eae8c34c49ad38ef527) | block.c (30f55fb81ff65473d673e79ca7175672e859fa2f) |
---|---|
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 --- 60 unchanged lines hidden (view full) --- 69 QDict *options, int flags, 70 BlockDriverState *parent, 71 const BdrvChildRole *child_role, 72 Error **errp); 73 74/* If non-zero, use only whitelisted block drivers */ 75static int use_bdrv_whitelist; 76 | 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 --- 60 unchanged lines hidden (view full) --- 69 QDict *options, int flags, 70 BlockDriverState *parent, 71 const BdrvChildRole *child_role, 72 Error **errp); 73 74/* If non-zero, use only whitelisted block drivers */ 75static int use_bdrv_whitelist; 76 |
77static void bdrv_close(BlockDriverState *bs); 78 | |
79#ifdef _WIN32 80static int is_windows_drive_prefix(const char *filename) 81{ 82 return (((filename[0] >= 'a' && filename[0] <= 'z') || 83 (filename[0] >= 'A' && filename[0] <= 'Z')) && 84 filename[1] == ':'); 85} 86 --- 2018 unchanged lines hidden (view full) --- 2105} 2106 2107 2108static void bdrv_close(BlockDriverState *bs) 2109{ 2110 BdrvAioNotifier *ban, *ban_next; 2111 2112 assert(!bs->job); | 77#ifdef _WIN32 78static int is_windows_drive_prefix(const char *filename) 79{ 80 return (((filename[0] >= 'a' && filename[0] <= 'z') || 81 (filename[0] >= 'A' && filename[0] <= 'Z')) && 82 filename[1] == ':'); 83} 84 --- 2018 unchanged lines hidden (view full) --- 2103} 2104 2105 2106static void bdrv_close(BlockDriverState *bs) 2107{ 2108 BdrvAioNotifier *ban, *ban_next; 2109 2110 assert(!bs->job); |
2111 assert(!bs->refcnt); |
|
2113 2114 bdrv_drained_begin(bs); /* complete I/O */ 2115 bdrv_flush(bs); 2116 bdrv_drain(bs); /* in case flush left pending I/O */ 2117 2118 bdrv_release_named_dirty_bitmaps(bs); 2119 assert(QLIST_EMPTY(&bs->dirty_bitmaps)); 2120 --- 1864 unchanged lines hidden --- | 2112 2113 bdrv_drained_begin(bs); /* complete I/O */ 2114 bdrv_flush(bs); 2115 bdrv_drain(bs); /* in case flush left pending I/O */ 2116 2117 bdrv_release_named_dirty_bitmaps(bs); 2118 assert(QLIST_EMPTY(&bs->dirty_bitmaps)); 2119 --- 1864 unchanged lines hidden --- |