diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-05-26 14:29:29 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-05-26 14:29:30 +0100 |
commit | 2c56d06bafd8933d2a9c6e0aeb5d45f7c1fb5616 (patch) | |
tree | 0afd4cd98a38271bf76f02aee87f0ddfb5a0d0bd /qemu-io-cmds.c | |
parent | a62c89117fa19adc6f9242844468ac31ec535d7e (diff) | |
parent | b75536c9fa742f887304769d0608557bb8e3a27f (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Wed 25 May 2016 18:32:40 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (31 commits)
blockjob: Remove BlockJob.bs
commit: Use BlockBackend for I/O
backup: Use BlockBackend for I/O
backup: Remove bs parameter from backup_do_cow()
backup: Pack Notifier within BackupBlockJob
backup: Don't leak BackupBlockJob in error path
mirror: Use BlockBackend for I/O
mirror: Allow target that already has a BlockBackend
stream: Use BlockBackend for I/O
block: Make blk_co_preadv/pwritev() public
block: Convert block job core to BlockBackend
block: Default to enabled write cache in blk_new()
block: Cancel jobs first in bdrv_close_all()
block: keep a list of block jobs
block: Rename blk_write_zeroes()
dma-helpers: change BlockBackend to opaque value in DMAIOFunc
dma-helpers: change interface to byte-based
block: Propagate .drained_begin/end callbacks
block: Fix reconfiguring graph with drained nodes
block: Make bdrv_drain() use bdrv_drained_begin/end()
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qemu-io-cmds.c')
-rw-r--r-- | qemu-io-cmds.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index e766791ffc..09e879f872 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -451,12 +451,12 @@ typedef struct { bool done; } CoWriteZeroes; -static void coroutine_fn co_write_zeroes_entry(void *opaque) +static void coroutine_fn co_pwrite_zeroes_entry(void *opaque) { CoWriteZeroes *data = opaque; - data->ret = blk_co_write_zeroes(data->blk, data->offset, data->count, - data->flags); + data->ret = blk_co_pwrite_zeroes(data->blk, data->offset, data->count, + data->flags); data->done = true; if (data->ret < 0) { *data->total = data->ret; @@ -466,8 +466,8 @@ static void coroutine_fn co_write_zeroes_entry(void *opaque) *data->total = data->count; } -static int do_co_write_zeroes(BlockBackend *blk, int64_t offset, int64_t count, - int flags, int64_t *total) +static int do_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, + int64_t count, int flags, int64_t *total) { Coroutine *co; CoWriteZeroes data = { @@ -483,7 +483,7 @@ static int do_co_write_zeroes(BlockBackend *blk, int64_t offset, int64_t count, return -ERANGE; } - co = qemu_coroutine_create(co_write_zeroes_entry); + co = qemu_coroutine_create(co_pwrite_zeroes_entry); qemu_coroutine_enter(co, &data); while (!data.done) { aio_poll(blk_get_aio_context(blk), true); @@ -901,7 +901,7 @@ static void write_help(void) " -C, -- report statistics in a machine parsable format\n" " -q, -- quiet mode, do not show I/O statistics\n" " -u, -- with -z, allow unmapping\n" -" -z, -- write zeroes using blk_co_write_zeroes\n" +" -z, -- write zeroes using blk_co_pwrite_zeroes\n" "\n"); } @@ -1033,7 +1033,7 @@ static int write_f(BlockBackend *blk, int argc, char **argv) if (bflag) { cnt = do_save_vmstate(blk, buf, offset, count, &total); } else if (zflag) { - cnt = do_co_write_zeroes(blk, offset, count, flags, &total); + cnt = do_co_pwrite_zeroes(blk, offset, count, flags, &total); } else if (cflag) { cnt = do_write_compressed(blk, buf, offset, count, &total); } else { @@ -1376,7 +1376,7 @@ static void aio_write_help(void) " -i, -- treat request as invalid, for exercising stats\n" " -q, -- quiet mode, do not show I/O statistics\n" " -u, -- with -z, allow unmapping\n" -" -z, -- write zeroes using blk_aio_write_zeroes\n" +" -z, -- write zeroes using blk_aio_pwrite_zeroes\n" "\n"); } @@ -1475,8 +1475,8 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv) } ctx->qiov.size = count; - blk_aio_write_zeroes(blk, ctx->offset, count, flags, aio_write_done, - ctx); + blk_aio_pwrite_zeroes(blk, ctx->offset, count, flags, aio_write_done, + ctx); } else { nr_iov = argc - optind; ctx->buf = create_iovec(blk, &ctx->qiov, &argv[optind], nr_iov, |