job.c (7fa24b8d61be040ba58bed6fc1c16fd5fb7b6af0) job.c (142e6907120d12de1e7ac402e556597ebbab86e8)
1/*
2 * Background jobs (long-running operations)
3 *
4 * Copyright (c) 2011 IBM Corp.
5 * Copyright (c) 2012, 2018 Red Hat, Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

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

583 job_event_idle_locked(job);
584 job_unlock();
585 qemu_coroutine_yield();
586 job_lock();
587
588 next_aio_context = job->aio_context;
589 /*
590 * Coroutine has resumed, but in the meanwhile the job AioContext
1/*
2 * Background jobs (long-running operations)
3 *
4 * Copyright (c) 2011 IBM Corp.
5 * Copyright (c) 2012, 2018 Red Hat, Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

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

583 job_event_idle_locked(job);
584 job_unlock();
585 qemu_coroutine_yield();
586 job_lock();
587
588 next_aio_context = job->aio_context;
589 /*
590 * Coroutine has resumed, but in the meanwhile the job AioContext
591 * might have changed via bdrv_try_set_aio_context(), so we need to move
591 * might have changed via bdrv_try_change_aio_context(), so we need to move
592 * the coroutine too in the new aiocontext.
593 */
594 while (qemu_get_current_aio_context() != next_aio_context) {
595 job_unlock();
596 aio_co_reschedule_self(next_aio_context);
597 job_lock();
598 next_aio_context = job->aio_context;
599 }

--- 680 unchanged lines hidden ---
592 * the coroutine too in the new aiocontext.
593 */
594 while (qemu_get_current_aio_context() != next_aio_context) {
595 job_unlock();
596 aio_co_reschedule_self(next_aio_context);
597 job_lock();
598 next_aio_context = job->aio_context;
599 }

--- 680 unchanged lines hidden ---