From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK2JH-0000uR-8j for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:36:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK2J8-0002gA-5j for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:36:03 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:37152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK2J7-0002g3-Tf for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:35:54 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Aug 2014 10:35:52 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id F20441B0805F for ; Wed, 20 Aug 2014 10:36:45 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s7K9ZoQU26017880 for ; Wed, 20 Aug 2014 09:35:50 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s7K9Zo3b025370 for ; Wed, 20 Aug 2014 03:35:50 -0600 Message-ID: <53F46BF2.6070705@de.ibm.com> Date: Wed, 20 Aug 2014 11:35:46 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1406636839-11946-1-git-send-email-tumanova@linux.vnet.ibm.com> <1406636839-11946-2-git-send-email-tumanova@linux.vnet.ibm.com> <53F459FD.2050108@redhat.com> In-Reply-To: <53F459FD.2050108@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] hd-geometry.c: Integrate HDIO_GETGEO in guessing for target-s390x List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Ekaterina Tumanova , Public KVM Mailing List Cc: cornelia.huck@de.ibm.com, dahi@linux.vnet.ibm.com On 20/08/14 10:19, Paolo Bonzini wrote: > Il 29/07/2014 14:27, Ekaterina Tumanova ha scritto: >> The new HDIO_GETGEO logic is required for two use cases: >> a) Support for geometries of Direct Attached Storage Disks (DASD) >> on s390x configured as backing of virtio block devices. > > Is this still relevant now that QEMU can emulate 512-byte sectors on top > of host devices with 4k sectors? Yes, the geometry and the block size define the layout of the DASD disk format. This defines how the ibm disk layout partition table looks like. So partition detection of the IBM layout only works if values are correct. (see linux block/partitions/ibm.c. it needs these values to correctly locate the data structures). Furthermore, if you do an mkfs in the host and the guest sees a different block size all kind of strange things will happen when mounting, no? > >> b) Support for FCP attached SCSI disks that do not yet have a >> partition table. Without this patch, fdisk -l on the host would >> return different results then fdisk -l in the guest. > > Can you provide an example? scsi disk in the host: [root@host ~]# sfdisk -g /dev/disk/by-id/wwn-0x6005076305ffc1ae0000000000002593 /dev/disk/by-id/wwn-0x6005076305ffc1ae0000000000002593: 1011 cylinders, 34 heads, 61 sectors/track same scsi disk in the guest as virtio-blk: scsi disk in the guest: [root@guest ~]# sfdisk -g /dev/disk/by-id/virtio-d20 /dev/disk/by-id/virtio-d20: 2080 cylinders, 16 heads, 63 sectors/track 16/63 is currently hardcoded by QEMU, no matter what the host thinks. This gets overridden as soon as there is a partition table. command line was: -drive file=/dev/disk/by-id/scsi-36005076305ffc1ae0000000000002593,if=none,id=drive-virtio-disk20,format=raw,serial=d20,cache=none,aio=native > > Paolo >