qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V3 2/2] virtio-block: support auto-sensing of bl


From: Christian Borntraeger
Subject: Re: [Qemu-devel] [PATCH V3 2/2] virtio-block: support auto-sensing of block sizes
Date: Tue, 12 Feb 2013 14:51:03 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 08/02/13 15:52, Einar Lueck wrote:
> Virtio-blk does not impose fixed block sizes for access to
> backing devices. This patch introduces support for auto
> lookup of the block sizes of the backing block device. This
> automatic lookup needs to be enabled explicitly. Users may
> do this by specifying (physical|logical)_block_size=0.
> Machine types may do this for their defaults, too.
> To achieve this, a new function blkconf_blocksizes is
> implemented. If physical or logical block size are zero
> a corresponding ioctl tries to find an appropriate value.
> If this does not work, 512 is used. blkconf_blocksizes
> is therefore only called w/in the virtio-blk context.
> For s390-virtio, this patch configures auto lookup as
> default. For virtio-ccw, this is already a default in
> the existing upstream implementation.
> 
> Signed-off-by: Einar Lueck <address@hidden>

together with the patch below:
Reviewed-by: Christian Borntraeger <address@hidden>



s390: enable block size auto-sensing also for virtio-ccw

The ccw transport for s390 should also enable block size
sensing.

Signed-off-by: Christian Borntraeger <address@hidden>

diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index d92e427..f6a08b2 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -731,7 +731,7 @@ static const TypeInfo virtio_ccw_net = {
 
 static Property virtio_ccw_blk_properties[] = {
     DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id),
-    DEFINE_BLOCK_PROPERTIES(VirtioCcwDevice, blk.conf),
+    DEFINE_BLOCK_PROPERTIES_EXTENDED(VirtioCcwDevice, blk.conf, 0),
     DEFINE_PROP_STRING("serial", VirtioCcwDevice, blk.serial),
 #ifdef __linux__
     DEFINE_PROP_BIT("scsi", VirtioCcwDevice, blk.scsi, 0, true),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]