| 385 | } |
| 386 | |
| 387 | static int bf_write_async(BlockDevice *bs, |
| 388 | uint64_t sector_num, const uint8_t *buf, int n, |
| 389 | BlockDeviceCompletionFunc *cb, void *opaque) |
| 390 | { |
| 391 | BlockDeviceHTTP *bf = bs->opaque; |
| 392 | // printf("bf_write_async: sector_num=%" PRId64 " n=%d\n", sector_num, n); |
| 393 | bf->is_write = TRUE; |
| 394 | bf->sector_num = sector_num; |
| 395 | bf->io_buf = (uint8_t *)buf; |
| 396 | bf->sector_count = n; |
| 397 | bf->sector_index = 0; |
| 398 | bf->cb = cb; |
| 399 | bf->opaque = opaque; |
| 400 | bf->n_write_sectors += n; |
| 401 | return bf_rw_async1(bs, TRUE); |
| 402 | } |
| 403 | |
| 404 | BlockDevice *block_device_init_http(const char *url, |
| 405 | int max_cache_size_kb, |
nothing calls this directly
no test coverage detected