From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur9c7-0004Oa-Tk for qemu-devel@nongnu.org; Mon, 24 Jun 2013 12:27:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur9c6-0001V6-Pb for qemu-devel@nongnu.org; Mon, 24 Jun 2013 12:27:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur9c6-0001V1-IS for qemu-devel@nongnu.org; Mon, 24 Jun 2013 12:27:34 -0400 Message-ID: <51C87370.7060802@redhat.com> Date: Mon, 24 Jun 2013 18:27:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1371934712-11714-1-git-send-email-pl@kamp.de> <1371934712-11714-8-git-send-email-pl@kamp.de> <51C85808.7000206@redhat.com> <51C86F7D.401@kamp.de> <51C87011.7080404@redhat.com> <51C872B4.9050301@kamp.de> In-Reply-To: <51C872B4.9050301@kamp.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/8] iscsi: assert that sectors are aligned to LUN blocksize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: Kevin Wolf , ronniesahlberg@gmail.com, qemu-devel@nongnu.org, Stefan Hajnoczi Il 24/06/2013 18:24, Peter Lieven ha scritto: >> > So far, 4K blocksize is usable if you also specify the same block size >> > for the guest device. I have posted once the patches to do >> > read-modify-write, but I never really pursued inclusion of those. >> > >> > In any case, the right place to fix this is the block layer; >> > driver-specific hacks are... hacks. :) > Where do I find the sector size if not in BDRV_SECTOR_SIZE? > Is there a dynamic field or is the answer qemu only support 512 Byte > sector size at the moment? bdrv_read/write and friends are always in 512-byte units. There is bs->buffer_alignment for the guest sector size, but it is not set at bdrv_open, only later. So I think QEMU support for bigger sectors is too sparse to be useful. > So you would go for fail to open a device if the LUN blocksize is > not equal to BDRV_SECTOR_SIZE? Either that, or fails reads/writes that are not aligned. Paolo