Revision 6d519a5f block.c
b/block.c | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
#include "config-host.h" |
25 | 25 |
#include "qemu-common.h" |
26 |
#include "trace.h" |
|
26 | 27 |
#include "monitor.h" |
27 | 28 |
#include "block_int.h" |
28 | 29 |
#include "module.h" |
... | ... | |
2063 | 2064 |
{ |
2064 | 2065 |
MultiwriteCB *mcb = opaque; |
2065 | 2066 |
|
2067 |
trace_multiwrite_cb(mcb, ret); |
|
2068 |
|
|
2066 | 2069 |
if (ret < 0 && !mcb->error) { |
2067 | 2070 |
mcb->error = ret; |
2068 | 2071 |
} |
... | ... | |
2203 | 2206 |
// Check for mergable requests |
2204 | 2207 |
num_reqs = multiwrite_merge(bs, reqs, num_reqs, mcb); |
2205 | 2208 |
|
2209 |
trace_bdrv_aio_multiwrite(mcb, mcb->num_callbacks, num_reqs); |
|
2210 |
|
|
2206 | 2211 |
/* |
2207 | 2212 |
* Run the aio requests. As soon as one request can't be submitted |
2208 | 2213 |
* successfully, fail all requests that are not yet submitted (we must |
... | ... | |
2224 | 2229 |
*/ |
2225 | 2230 |
mcb->num_requests = 1; |
2226 | 2231 |
|
2232 |
// Run the aio requests |
|
2227 | 2233 |
for (i = 0; i < num_reqs; i++) { |
2228 | 2234 |
mcb->num_requests++; |
2229 | 2235 |
acb = bdrv_aio_writev(bs, reqs[i].sector, reqs[i].qiov, |
... | ... | |
2234 | 2240 |
// submitted yet. Otherwise we'll wait for the submitted AIOs to |
2235 | 2241 |
// complete and report the error in the callback. |
2236 | 2242 |
if (i == 0) { |
2243 |
trace_bdrv_aio_multiwrite_earlyfail(mcb); |
|
2237 | 2244 |
goto fail; |
2238 | 2245 |
} else { |
2246 |
trace_bdrv_aio_multiwrite_latefail(mcb, i); |
|
2239 | 2247 |
multiwrite_cb(mcb, -EIO); |
2240 | 2248 |
break; |
2241 | 2249 |
} |
Also available in: Unified diff