[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 24/76] block/null: Support reopen
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 24/76] block/null: Support reopen |
Date: |
Tue, 28 Apr 2015 17:00:06 +0200 |
From: Fam Zheng <address@hidden>
Reopen is used in block-commit. With this always-succeed operation, it
is now possible to test committing to a null drive, by specifying
"null-aio://" or "null-co://" as the backing image when creating the
qcow2 image.
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/null.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/null.c b/block/null.c
index 267d3e6..7d08323 100644
--- a/block/null.c
+++ b/block/null.c
@@ -177,6 +177,12 @@ static BlockAIOCB *null_aio_flush(BlockDriverState *bs,
return null_aio_common(bs, cb, opaque);
}
+static int null_reopen_prepare(BDRVReopenState *reopen_state,
+ BlockReopenQueue *queue, Error **errp)
+{
+ return 0;
+}
+
static BlockDriver bdrv_null_co = {
.format_name = "null-co",
.protocol_name = "null-co",
@@ -189,6 +195,7 @@ static BlockDriver bdrv_null_co = {
.bdrv_co_readv = null_co_readv,
.bdrv_co_writev = null_co_writev,
.bdrv_co_flush_to_disk = null_co_flush,
+ .bdrv_reopen_prepare = null_reopen_prepare,
};
static BlockDriver bdrv_null_aio = {
@@ -203,6 +210,7 @@ static BlockDriver bdrv_null_aio = {
.bdrv_aio_readv = null_aio_readv,
.bdrv_aio_writev = null_aio_writev,
.bdrv_aio_flush = null_aio_flush,
+ .bdrv_reopen_prepare = null_reopen_prepare,
};
static void bdrv_null_init(void)
--
1.8.3.1
- [Qemu-block] [PULL 15/76] iothread: release iothread around aio_poll, (continued)
- [Qemu-block] [PULL 15/76] iothread: release iothread around aio_poll, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 14/76] AioContext: acquire/release AioContext during aio_poll, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 16/76] block-backend: Expose bdrv_write_zeroes(), Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 18/76] qemu-iotests: Some qemu-img convert tests, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 17/76] qemu-img convert: Rewrite copying logic, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 19/76] blkdebug: Add bdrv_truncate(), Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 20/76] vhdx: Fix zero-fill iov length, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 21/76] thread-pool: clean up thread_pool_completion_bh(), Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 22/76] scripts: add 'qemu coroutine' command to qemu-gdb.py, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 25/76] MAINTAINERS: Add Fam Zheng as Null block driver maintainer, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 24/76] block/null: Support reopen,
Kevin Wolf <=
- [Qemu-block] [PULL 23/76] block/null: Latency simulation by adding new option "latency-ns", Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 26/76] blockjob: Allow nested pause, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 27/76] block: Pause block jobs in bdrv_drain_all, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 28/76] qemu-iotests: Test that "stop" doesn't drain block jobs, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 31/76] virtio_blk: comment fix, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 29/76] blockjob: Update function name in comments, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 32/76] m25p80: add missing blk_attach_dev_nofail, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 30/76] block: avoid unnecessary bottom halves, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 33/76] m25p80: fix s->blk usage before assignment, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 34/76] block: document block-stream in qmp-commands.hx, Kevin Wolf, 2015/04/28