Commit 2acf5af04daf02723a4ba1b720a53b6e718023f4

Authored by aliguori
1 parent de5c2d0a

block-raw is not a protocol

The protocol_name "file" was added to the block driver when async IO was
introduced.  This can be used to select that a file is treated as a raw
device instead of probing for the type.  However, protocols are not subject
to path interpretation which cases qcow2 images with raw base images to not
function is the path was specified relatively.

The fix is simply to remove the protocol_name from the raw block driver.  The
proper way to force the use of a raw block format is to use the format= option
with -drive.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5233 c046a42c-6fe2-441c-8c8c-71466251a162
block-raw-posix.c
@@ -846,7 +846,6 @@ BlockDriver bdrv_raw = { @@ -846,7 +846,6 @@ BlockDriver bdrv_raw = {
846 .bdrv_aio_cancel = raw_aio_cancel, 846 .bdrv_aio_cancel = raw_aio_cancel,
847 .aiocb_size = sizeof(RawAIOCB), 847 .aiocb_size = sizeof(RawAIOCB),
848 #endif 848 #endif
849 - .protocol_name = "file",  
850 .bdrv_pread = raw_pread, 849 .bdrv_pread = raw_pread,
851 .bdrv_pwrite = raw_pwrite, 850 .bdrv_pwrite = raw_pwrite,
852 .bdrv_truncate = raw_truncate, 851 .bdrv_truncate = raw_truncate,
block-raw-win32.c
@@ -369,7 +369,6 @@ BlockDriver bdrv_raw = { @@ -369,7 +369,6 @@ BlockDriver bdrv_raw = {
369 .bdrv_aio_cancel = raw_aio_cancel, 369 .bdrv_aio_cancel = raw_aio_cancel,
370 .aiocb_size = sizeof(RawAIOCB); 370 .aiocb_size = sizeof(RawAIOCB);
371 #endif 371 #endif
372 - .protocol_name = "file",  
373 .bdrv_pread = raw_pread, 372 .bdrv_pread = raw_pread,
374 .bdrv_pwrite = raw_pwrite, 373 .bdrv_pwrite = raw_pwrite,
375 .bdrv_truncate = raw_truncate, 374 .bdrv_truncate = raw_truncate,