Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnCBn-00010Y-U0 for qemu-devel@nongnu.org; Thu, 04 Mar 2010 09:38:11 -0500 Received: from [199.232.76.173] (port=33509 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnCBn-00010Q-LC for qemu-devel@nongnu.org; Thu, 04 Mar 2010 09:38:11 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NnCBm-0006Cu-NF for qemu-devel@nongnu.org; Thu, 04 Mar 2010 09:38:11 -0500 Received: from mtagate7.de.ibm.com ([195.212.17.167]:37741) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NnCBm-0006C4-7t for qemu-devel@nongnu.org; Thu, 04 Mar 2010 09:38:10 -0500 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.1/8.13.1) with ESMTP id o24Ec2cN008561 for ; Thu, 4 Mar 2010 14:38:02 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o24Ec2Ln1671324 for ; Thu, 4 Mar 2010 15:38:02 +0100 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o24Ec1bL019500 for ; Thu, 4 Mar 2010 15:38:02 +0100 From: Christian Borntraeger Date: Thu, 4 Mar 2010 15:38:00 +0100 References: <20100304132017.GA2200@lst.de> In-Reply-To: <20100304132017.GA2200@lst.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201003041538.00643.borntraeger@de.ibm.com> Subject: [Qemu-devel] Re: [PATCH] block: add logical_block_size property List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org Am Donnerstag 04 M=E4rz 2010 14:20:17 schrieb Christoph Hellwig: >=20 > Add a logical block size attribute as various guest side tools only > increase the filesystem sector size based on it, not the advisory > physical block size. >=20 > For scsi we already have support for a different logical block size > in place for CDROMs that we can built upon. Only my recent block > device characteristics VPD page needs some fixups. Note that we > leave the logial block size for CDROMs hardcoded as the 2k value > is expected for it in general. >=20 > For virtio-blk we already have a feature flag claiming to support > a variable logical block size that was added for the s390 kuli > hypervisor. Interestingly it does not actually change the units > in which the protocol works, which is still fixed at 512 bytes, > but only communicates a different minimum I/O granularity. So > all we need to do in virtio is to add a trap for unaligned I/O > and round down the device size to the next multiple of the logical > block size. >=20 > IDE does not support any other logical block size than 512 bytes. We did that because we wanted to use DASD devices, which have a 4k block/sector size as backing for virtio. 512 byte request did work (thanks to host page cache) but a single 512 byte write might have triggered a 4k read and O_DIRECT accesses (avoiding host caching) was also not working. Testing and review is still in my todo list. Christian