History | View | Annotate | Download (5.8 kB)
bdrv: Use "Error" for creating images
Add an Error ** parameter to BlockDriver.bdrv_create to allow morespecific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
bdrv: Use "Error" for opening images
Add an Error ** parameter to BlockDriver.bdrv_open andBlockDriver.bdrv_file_open to allow more specific error messages.
block: introduce bdrv_get_block_status API
For now, bdrv_get_block_status is just another name for bdrv_is_allocated.The next patches will add more flags.
This also touches all block drivers with a mostly mechanical rename. Thesole exception is cow; because it calls cow_co_is_allocated from the read...
block: make bdrv_co_is_allocated static
bdrv_is_allocated can detect coroutine context and go through a fastpath, similar to other block layer functions.
Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
add skeleton for BSD licensed "raw" BlockDriver
On 08/05/13 15:03, Paolo Bonzini wrote:
----- Original Message ----- From: "Laszlo Ersek" <lersek@redhat.com>To: "Paolo Bonzini" <pbonzini@redhat.com>Sent: Monday, August 5, 2013 2:43:46 PM...
----- Original Message -----
From: "Laszlo Ersek" <lersek@redhat.com>To: "Paolo Bonzini" <pbonzini@redhat.com>Sent: Monday, August 5, 2013 2:43:46 PM...
raw_bsd: emit debug events in bdrv_co_readv() and bdrv_co_writev()
[...] 1) BlockDriver is a struct in which these function members areinteresting: .bdrv_reopen_prepare.bdrv_co_readv.bdrv_co_writev...
[...]
1) BlockDriver is a struct in which these function members areinteresting:
.bdrv_reopen_prepare.bdrv_co_readv.bdrv_co_writev...
raw_bsd: add raw_create()
[...] 2) This is also a simple forwarder function: .bdrv_create but there is no BlockDriverState argument so the forwarded-to functiondoes not have a bs->file argument either. The forwarded-to function is...
2) This is also a simple forwarder function:
.bdrv_create
but there is no BlockDriverState argument so the forwarded-to functiondoes not have a bs->file argument either. The forwarded-to function is...
raw_bsd: introduce "special members"
[...] 3) These members are special .format_name is the string "raw" .bdrv_open raw_open should set bs->sg to bs->file->sg and return 0.bdrv_close raw_close should do nothing...
3) These members are special
.format_name is the string "raw" .bdrv_open raw_open should set bs->sg to bs->file->sg and return 0.bdrv_close raw_close should do nothing...
raw_bsd: add raw_create_options
[...] 4) There is another member, .create_options, which is an array ofQEMUOptionParameter structs, terminated by an all-zero item. The onlyoption you need is for the virtual disk size. You will find something...
4) There is another member, .create_options, which is an array ofQEMUOptionParameter structs, terminated by an all-zero item. The onlyoption you need is for the virtual disk size. You will find something...
raw_bsd: register bdrv_raw
[...] 5) Formats are registered with bdrv_register (takes a BlockDriver*). Youalso need to pass the caller of bdrv_register to block_init.
5) Formats are registered with bdrv_register (takes a BlockDriver*). Youalso need to pass the caller of bdrv_register to block_init.
Fill in the BlockDriver structure with the raw_*() functions that have...
switch raw block driver from "raw.o" to "raw_bsd.o"
"Incoming" function prototypes and "outgoing" function calls must matchreality. Implemented using the "struct BlockDriver" definition in"include/block/block_int.h", and gcc errors & warnings.
v1->v2:...