blockdev.c (b26ded9a7d9709aacdff36e39630acbb87201057) | blockdev.c (7c8eece45b10fc9b716850345118ed6fa8d17887) |
---|---|
1/* 2 * QEMU host block devices 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2 or 7 * later. See the COPYING file in the top-level directory. 8 * --- 4121 unchanged lines hidden (view full) --- 4130 bdrv_add_child(parent_bs, new_bs, errp); 4131 } 4132} 4133 4134BlockJobInfoList *qmp_query_block_jobs(Error **errp) 4135{ 4136 BlockJobInfoList *head = NULL, **p_next = &head; 4137 BlockDriverState *bs; | 1/* 2 * QEMU host block devices 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2 or 7 * later. See the COPYING file in the top-level directory. 8 * --- 4121 unchanged lines hidden (view full) --- 4130 bdrv_add_child(parent_bs, new_bs, errp); 4131 } 4132} 4133 4134BlockJobInfoList *qmp_query_block_jobs(Error **errp) 4135{ 4136 BlockJobInfoList *head = NULL, **p_next = &head; 4137 BlockDriverState *bs; |
4138 BdrvNextIterator *it = NULL; |
|
4138 | 4139 |
4139 for (bs = bdrv_next(NULL); bs; bs = bdrv_next(bs)) { | 4140 while ((it = bdrv_next(it, &bs))) { |
4140 AioContext *aio_context = bdrv_get_aio_context(bs); 4141 4142 aio_context_acquire(aio_context); 4143 4144 if (bs->job) { 4145 BlockJobInfoList *elem = g_new0(BlockJobInfoList, 1); 4146 elem->value = block_job_query(bs->job); 4147 *p_next = elem; --- 188 unchanged lines hidden --- | 4141 AioContext *aio_context = bdrv_get_aio_context(bs); 4142 4143 aio_context_acquire(aio_context); 4144 4145 if (bs->job) { 4146 BlockJobInfoList *elem = g_new0(BlockJobInfoList, 1); 4147 elem->value = block_job_query(bs->job); 4148 *p_next = elem; --- 188 unchanged lines hidden --- |