From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRe6o-000400-Bm for qemu-devel@nongnu.org; Sun, 03 Jan 2010 22:59:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRe6j-0003zE-Jm for qemu-devel@nongnu.org; Sun, 03 Jan 2010 22:59:57 -0500 Received: from [199.232.76.173] (port=48712 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRe6j-0003z2-As for qemu-devel@nongnu.org; Sun, 03 Jan 2010 22:59:53 -0500 Received: from ozlabs.org ([203.10.76.45]:44392) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NRe6i-00030p-P8 for qemu-devel@nongnu.org; Sun, 03 Jan 2010 22:59:53 -0500 From: Rusty Russell Date: Mon, 4 Jan 2010 13:38:51 +1030 References: <1262018363-15871-1-git-send-email-avi@redhat.com> In-Reply-To: <1262018363-15871-1-git-send-email-avi@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201001041338.52621.rusty@rustcorp.com.au> Subject: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On Tue, 29 Dec 2009 03:09:23 am Avi Kivity wrote: > This patch adds a physical block size attribute to virtio disks, > corresponding to /sys/devices/.../physical_block_size. It is defined as > the request alignment which will not trigger RMW cycles. This can be > important for modern disks which use 4K physical sectors (though they > still support 512 logical sectors), and for file-backed disk images (which > have both the underlying filesystem block size and their own allocation > granularity to consider). > > Installers use this to align partitions to physical block boundaries. > > Note the spec already defined blk_size as the performance rather than > minimum alignment. However the driver interpreted this as the logical > block size, so I updated the spec to match the driver assuming the driver > predates the spec and that this is an error. I thought this was what I was doing, but I have shown over and over that I have no idea about block devices. Our current driver treats BLK_SIZE as the logical and physical size (see blk_queue_logical_block_size). I have no idea what "logical" vs. "physical" actually means. Anyone? Most importantly, is it some Linux-internal difference or a real I/O-visible distinction? Rusty.