Block layer patches for 2.11.0-rc4
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJaJXvPAAoJEH8JsnLIjy/WtG4P+wRXE/G4fyTDmnDJgYxZm6S8 spC5BpnBWDuux1Vo5TKHzRX6T3attoWLWlHYDLwDmi/ZW6UIVpDchn6sb5MhsoXQ hb9Qwwir2A/fOFBda+YOfqXlFTk4Dn5FdJYsYuSt/k834ixAsobSCrVVhdyFrTEb NyJWAl+4eJ7omGthCdsiZpheUFU9XdW2t8oARcjt+eCscgLao99IRh12LfiKtH+4 EmFtiEk6MaNStf+Yvr+B/ZG9JQJHQR/YvFRAiQ7ZUwXRNWOn1Wrg7bPNd8YVwMGd MbuZ2Hpl5oJMXZzi4kxyn9oQEJ426bbGRZgVg0rEiBlmCZXFGyJpth2f3PDO08Rj 0edfuwF+ArAbNr9VQIjG7p/yFzRYB09F1SCp2MxFPUXjxBdoAU1C4GLfUKu8N8y2 zMKl7Y9ngXzv8vk6NIH73/LuagAXHfnt5tsB3mb/fa1qySSX9Nx+zpm7ptpHiIrv xZNZalb9ev3KNF8JOYktpIySghBC2zNcpK9Ovfe8PwymEGNnlzzoYAcCVk7r1/LQ pc8i2LrD1t2ophwZZAPj2+D3UbUhkqvV3Mm4t7wMys3OGJM5hRv0BbABan3rARLY Q0jKrdLZDQZ5EL0GzbJphPeCbwkVLI4Ol8ZiAdQUasyDSLUOWaazUCcfJKUZVtTD JguEi1qB4hqcnOCCziq9 =SOiX -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Block layer patches for 2.11.0-rc4 # gpg: Signature made Mon 04 Dec 2017 16:46:07 GMT # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: blockjob: Make block_job_pause_all() keep a reference to the jobs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
2a4c7e8391
@ -730,6 +730,7 @@ void block_job_pause_all(void)
|
||||
AioContext *aio_context = blk_get_aio_context(job->blk);
|
||||
|
||||
aio_context_acquire(aio_context);
|
||||
block_job_ref(job);
|
||||
block_job_pause(job);
|
||||
aio_context_release(aio_context);
|
||||
}
|
||||
@ -808,12 +809,14 @@ void coroutine_fn block_job_pause_point(BlockJob *job)
|
||||
|
||||
void block_job_resume_all(void)
|
||||
{
|
||||
BlockJob *job = NULL;
|
||||
while ((job = block_job_next(job))) {
|
||||
BlockJob *job, *next;
|
||||
|
||||
QLIST_FOREACH_SAFE(job, &block_jobs, job_list, next) {
|
||||
AioContext *aio_context = blk_get_aio_context(job->blk);
|
||||
|
||||
aio_context_acquire(aio_context);
|
||||
block_job_resume(job);
|
||||
block_job_unref(job);
|
||||
aio_context_release(aio_context);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user