Am 01.09.2014 um 11:22 hat Fam Zheng geschrieben: > This is an analogue to Linux null_blk. It can be used for testing or > benchmarking block device emulation and general block layer > functionalities such as coroutines and throttling, where disk IO is not > necessary or wanted. > > Use null-aio:// for AIO version, and null-co:// for coroutine version. > > Signed-off-by: Fam Zheng <f...@redhat.com> > Reviewed-by: BenoƮt Canet <benoit.ca...@nodalink.com>
> +static BlockDriver bdrv_null_co = { > + .format_name = "null-co", > + .protocol_name = "null-co", > + .instance_size = sizeof(BDRVNullState), > + > + .bdrv_file_open = null_file_open, > + .bdrv_close = null_close, > + .bdrv_getlength = null_getlength, > + > + .bdrv_read = null_co_read, > + .bdrv_write = null_co_write, Any reason not to use the native .bdrv_co_readv/writev interfaces instead of the old, emulated versions that involve a bounce buffer? > + .bdrv_co_flush_to_disk = null_co_flush, > +}; Kevin