From patchwork Tue Feb 12 13:51:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 219928 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1A0D72C0089 for ; Wed, 13 Feb 2013 05:13:36 +1100 (EST) Received: from localhost ([::1]:43566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5KMI-0000Ow-2a for incoming@patchwork.ozlabs.org; Tue, 12 Feb 2013 13:13:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5KM9-0000OK-JR for qemu-devel@nongnu.org; Tue, 12 Feb 2013 13:13:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5KM7-00026H-07 for qemu-devel@nongnu.org; Tue, 12 Feb 2013 13:13:25 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:45894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5GGQ-0004ko-Bw for qemu-devel@nongnu.org; Tue, 12 Feb 2013 08:51:14 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Feb 2013 13:49:27 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 12 Feb 2013 13:49:24 -0000 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r1CDoxED34144438 for ; Tue, 12 Feb 2013 13:50:59 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r1CDp6sN029824 for ; Tue, 12 Feb 2013 06:51:08 -0700 Received: from [9.152.224.94] (dyn-9-152-224-94.boeblingen.de.ibm.com [9.152.224.94]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r1CDp3Ro029681; Tue, 12 Feb 2013 06:51:04 -0700 Message-ID: <511A48C7.3050802@de.ibm.com> Date: Tue, 12 Feb 2013 14:51:03 +0100 From: Christian Borntraeger User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Einar Lueck References: <1360335155-39413-1-git-send-email-elelueck@linux.vnet.ibm.com> <1360335155-39413-3-git-send-email-elelueck@linux.vnet.ibm.com> In-Reply-To: <1360335155-39413-3-git-send-email-elelueck@linux.vnet.ibm.com> x-cbid: 13021213-8372-0000-0000-000005256FB6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.108 Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, agraf@suse.de, cornelia.huck@de.ibm.com, pbonzini@redhat.com Subject: Re: [Qemu-devel] [PATCH V3 2/2] virtio-block: support auto-sensing of block sizes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 together with the patch below: Reviewed-by: Christian Borntraeger 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 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),