From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPXp5-0004B6-1t for qemu-devel@nongnu.org; Thu, 04 Sep 2014 10:15:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPXou-00086N-Su for qemu-devel@nongnu.org; Thu, 04 Sep 2014 10:15:38 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:43416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPXou-000865-Kk for qemu-devel@nongnu.org; Thu, 04 Sep 2014 10:15:28 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Sep 2014 15:15:26 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 45B352190046 for ; Thu, 4 Sep 2014 15:15:04 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s84EFN2S41943100 for ; Thu, 4 Sep 2014 14:15:23 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s84EFMri005713 for ; Thu, 4 Sep 2014 10:15:23 -0400 Message-ID: <540873F9.3010200@de.ibm.com> Date: Thu, 04 Sep 2014 16:15:21 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1406636839-11946-1-git-send-email-tumanova@linux.vnet.ibm.com> <1406636839-11946-5-git-send-email-tumanova@linux.vnet.ibm.com> <20140903154636.GB30664@stefanha-thinkpad.redhat.com> In-Reply-To: <20140903154636.GB30664@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] blocksize: add blkconf_blocksize call to all block devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Ekaterina Tumanova Cc: cornelia.huck@de.ibm.com, dahi@linux.vnet.ibm.com, Public KVM Mailing List On 03/09/14 17:46, Stefan Hajnoczi wrote: > On Tue, Jul 29, 2014 at 02:27:19PM +0200, Ekaterina Tumanova wrote: >> This patch add the blkconf_blocksize call to all >> devices, which use DEFINE_BLOCK_PROPERTIES. >> If the underlying driver function fails, blkconf_blocksizes >> will set blocksizes to default (512) value. >> >> Signed-off-by: Ekaterina Tumanova >> Reviewed-by: David Hildenbrand >> Acked-by: Cornelia Huck >> --- >> hw/block/nvme.c | 1 + >> hw/block/virtio-blk.c | 1 + >> hw/ide/qdev.c | 1 + >> hw/scsi/scsi-disk.c | 1 + >> hw/usb/dev-storage.c | 1 + >> include/hw/block/block.h | 4 ++-- >> 6 files changed, 7 insertions(+), 2 deletions(-) > > Wasn't this NACKed before on the grounds that it is likely to upset the Not yet ;-) (just other other comments) > guest after live migration? QEMU doesn't automatically query the > storage because these parameters must be preserved across migration. Would it be more acceptable if this auto detection is only running on init, but on migration the target will use the block size of the source? > > The knowledge of these fields belongs in the management tool that > orchestrates migration, not QEMU. I think the main problem that this patch tries to address is, is not migration. It tries to make the whole guest work an pass-through dasd. It guess that this problem did not happen on x86 yet as most disks are 512 and most file system will cope with sector size changes. Maybe this will change as soon as you run a guest on a real disk (no image file) and the disk happens to be a 4Kn disk. Question is: Do we want all users to specify the block size of the underlying disk, just because its a 4Kn-type disk? Or in other words: shall we force everybody to change qemu-system-x86_64 -hda /dev/sdc into qemu-system-x86_64 -drive file=/dev/sdc,if=none,id=mydisk -device ide-drive,bus=ide.0,drive=mydisk,physical_block_size=4096 for a 4Kn device? Or for the libvirt case, we need Or is your suggestion to let libvirt detect the block size for host devices? > If you want specific parameters, please put them in your guest > configuration. QEMU and libvirt support that. > > I'm concerned that this patch serious is likely to break things and > autodetection doesn't add much value since the management tool needs to > be aware of this information anyway. I am totally with you, that we should make this patch in a way to not break anything on other platforms. Christian