From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSFr4-0003C4-MJ for qemu-devel@nongnu.org; Tue, 05 Jan 2010 15:18:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSFqz-00038s-Uo for qemu-devel@nongnu.org; Tue, 05 Jan 2010 15:18:14 -0500 Received: from [199.232.76.173] (port=58325 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSFqz-00038g-Lt for qemu-devel@nongnu.org; Tue, 05 Jan 2010 15:18:09 -0500 Received: from mail2.shareable.org ([80.68.89.115]:57967) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSFqz-0005u3-5H for qemu-devel@nongnu.org; Tue, 05 Jan 2010 15:18:09 -0500 Date: Tue, 5 Jan 2010 20:18:01 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size Message-ID: <20100105201801.GK14376@shareable.org> References: <1262018363-15871-1-git-send-email-avi@redhat.com> <201001041338.52621.rusty@rustcorp.com.au> <4B4192A1.3030801@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4192A1.3030801@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Rusty Russell , qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Avi Kivity wrote: > Physical block size is the what the logical block size would have been > is software didn't suck. In theory they should be the same, but since > compatibility reaons clamp the logical block size to 512, they have to > differ. A disk may have a physical block size of 4096 and emulate > logical block size of 512 on top of that using read-modify-write. > > Or so I understand it. I think that's right, but a side effect is that if you get a power failure during the read-modify-write, bytes anywhere in 4096 sector may be incorrect, so journalling (etc.) needs to use 4096 byte blocks for data integrity, even though the drive emulates smaller writes. -- Jamie