Fam Zheng
3391f5e51c
thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async
...
The .cancel_async shares the same the first half with .cancel: try to
steal the request if not submitted yet. In this case set the elem to
THREAD_DONE status and ret to -ECANCELED, which means
thread_pool_completion_bh will call the cb with -ECANCELED.
If the request is already submitted, do nothing, as we know the normal
completion will happen in the future.
Testing code update:
Before, done_cb is only called if the request is already submitted by
thread pool. Now done_cb is always called, even before it is submitted,
because we emulate bdrv_aio_cancel with bdrv_aio_cancel_async. So also
update the test criteria accordingly.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-09-22 11:39:02 +01:00
..
2014-07-28 23:02:39 +02:00
2014-08-20 11:51:28 +02:00
2014-09-12 13:58:07 +01:00
2013-10-28 17:34:42 +01:00
2014-06-27 09:27:56 -04:00
2014-09-12 15:43:06 +02:00
2014-05-28 14:47:35 +01:00
2014-06-23 19:14:52 +02:00
2014-04-27 13:04:18 +04:00
2014-05-05 20:58:33 +02:00
2014-08-24 13:16:32 +04:00
2013-11-07 13:58:58 +01:00
2013-11-19 10:28:14 +01:00
2014-05-19 11:36:48 +02:00
2014-06-23 11:01:24 -04:00
2013-12-24 17:27:17 +01:00
2014-04-28 11:03:39 +02:00
2014-06-09 15:38:58 +02:00
2014-02-14 16:22:33 +01:00
2014-02-17 23:10:02 +01:00
2014-05-05 20:58:33 +02:00
2014-07-18 17:45:37 +04:00
2014-02-17 23:10:02 +01:00
2013-11-19 10:28:14 +01:00
2014-02-20 13:05:48 +00:00
2014-03-31 22:36:17 +02:00
2014-09-08 11:12:43 +01:00
2014-05-05 20:58:33 +02:00
2014-05-05 20:58:33 +02:00
2014-02-14 21:07:13 +01:00
2014-09-08 11:12:43 +01:00
2014-09-08 11:12:43 +01:00
2014-02-17 23:10:02 +01:00
2014-09-18 21:50:30 +03:00
2014-02-14 20:50:19 +01:00
2014-03-31 22:35:03 +02:00
2014-02-14 16:22:33 +01:00
2014-03-31 22:36:17 +02:00
2014-03-12 20:13:02 +01:00
2014-07-01 10:15:33 +02:00
2014-07-01 10:20:41 +02:00
2014-02-17 23:10:02 +01:00
2014-02-14 16:22:33 +01:00
2014-03-13 01:21:57 +01:00
2014-08-29 10:46:58 +01:00
2013-11-05 19:59:43 -08:00
2014-08-20 11:51:28 +02:00
2014-03-02 17:20:37 +04:00
2013-11-05 19:59:43 -08:00
2014-09-18 21:51:24 +03:00
2014-07-18 17:45:37 +04:00
2014-03-11 09:07:42 -04:00
2014-06-30 15:06:11 +02:00
2014-05-15 14:00:46 -04:00
2014-05-15 14:00:46 -04:00
2014-05-28 17:36:09 +02:00
2014-03-13 14:42:21 +01:00
2014-06-19 18:44:22 +03:00
2014-07-14 12:03:20 +02:00
2014-09-22 11:39:02 +01:00
2014-07-18 17:45:37 +04:00
2014-07-18 17:45:37 +04:00
2014-07-18 17:45:37 +04:00
2014-07-01 10:20:41 +02:00
2014-02-14 21:02:27 +01:00
2014-08-15 18:03:13 +01:00
2014-08-29 12:53:47 +02:00
2014-08-29 12:53:47 +02:00
2014-08-29 12:53:47 +02:00
2014-07-18 02:14:15 +03:00
2014-03-31 22:35:50 +02:00
2014-03-13 01:21:56 +01:00
2014-09-08 11:12:43 +01:00
2014-03-13 21:12:07 +01:00
2014-02-14 21:01:03 +01:00
2014-03-13 01:21:56 +01:00
2014-03-13 01:21:56 +01:00
2014-03-13 01:21:57 +01:00
2014-02-14 16:22:33 +01:00
2014-07-18 14:57:35 +02:00