fixup! virtio-blk: fail get_features when both scsi and 1.0 were set
PATCH 1/1 fixup! virtio-blk: fail get_features when both scsi and 1.0 were set
Tweak the error message so that it does not mention SCSI passthrough. That can be confusing because you can have scsi=on even for file-backed image, which obviously do not support SCSI passthrough at the block layer level.
--- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/block/virtio-blk.c +1 -1
@@ -734,7 +734,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,virtio_clear_feature (&features,VIRTIO_F_ANY_LAYOUT );if (__virtio_has_feature (features,VIRTIO_F_VERSION_1 )) {if (s->conf.scsi) { -error_setg (errp,"Virtio 1.0 does not support scsi passthrough!" ); +error_setg (errp,"Please set scsi=off for virtio-blk devices in order to use virtio 1.0" );return 0 ; }virtio_add_feature (&features,VIRTIO_F_ANY_LAYOUT );
Signature · 1 line
2.1.4
Quoted 14 lines · On Mon, 27 Jul 2015 13:41:32 +0200 Paolo Bonzini <[email protected]> wrote:
Tweak the error message so that it does not mention SCSI passthrough. That can be confusing because you can have scsi=on even for file-backed image, which obviously do not support SCSI passthrough at the block layer level.
Signed-off-by Paolo Bonzini <[email protected]>--- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/block/virtio-blk.c +0
-0
hw/block/virtio-blk.c static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features, · line 740
Quoted 8 lines
hw/block/virtio-blk.c +1
-1@@ -734,7 +734,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,virtio_clear_feature (&features,VIRTIO_F_ANY_LAYOUT );if (__virtio_has_feature (features,VIRTIO_F_VERSION_1 )) {if (s->conf.scsi) { -error_setg (errp,"Virtio 1.0 does not support scsi passthrough!" ); +error_setg (errp,"Please set scsi=off for virtio-blk devices in order to use virtio 1.0" );return 0 ; }virtio_add_feature (&features,VIRTIO_F_ANY_LAYOUT );
I like that message much better.
Quoted 14 lines · Paolo Bonzini
Tweak the error message so that it does not mention SCSI passthrough. That can be confusing because you can have scsi=on even for file-backed image, which obviously do not support SCSI passthrough at the block layer level.
Signed-off-by Paolo Bonzini <[email protected]>--- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/block/virtio-blk.c +0
-0
hw/block/virtio-blk.c static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features, · line 740
Quoted 8 lines
hw/block/virtio-blk.c +1
-1@@ -734,7 +734,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,virtio_clear_feature (&features,VIRTIO_F_ANY_LAYOUT );if (__virtio_has_feature (features,VIRTIO_F_VERSION_1 )) {if (s->conf.scsi) { -error_setg (errp,"Virtio 1.0 does not support scsi passthrough!" ); +error_setg (errp,"Please set scsi=off for virtio-blk devices in order to use virtio 1.0" );return 0 ; }virtio_add_feature (&features,VIRTIO_F_ANY_LAYOUT );
For the record, this patch has been merged as part of:
commit efb8206ca7f19f5a6ece1f2851a73a29de309b1e
Author: Jason Wang <[email protected]>
Date: Mon Jul 27 17:49:20 2015 +0800
virtio-blk: fail get_features when both scsi and 1.0 were set