From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Host's write request is 4KB larger than that of the guest? Date: Thu, 06 Jan 2011 17:13:33 +0200 Message-ID: <4D25DC1D.1050604@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Duy Le (Dan)" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33385 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088Ab1AFPNi (ORCPT ); Thu, 6 Jan 2011 10:13:38 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 01/06/2011 03:53 PM, Duy Le (Dan) wrote: > Hi there, > > I used a raw disk image to host a VM. I later used blktrace to capture > write requests issued from the guest to commit data to a physical disk > and found that the request size of the host is 8 blocks (4KB) larger > than that of the guest. Here is a part of the trace. > > --- Guest > 251,32 0 100 2.399993525 10 D W 18747926 + 8 [kblockd/0] > 251,32 0 101 2.399996297 10 D W 18752462 + 24 [kblockd/0] > 251,32 0 102 2.399998367 10 D W 18756566 + 8 [kblockd/0] > > --- Host > 8,16 0 155 2.415036111 32357 D W 19146095 + 16 [kvm] > 8,16 0 156 2.415042667 32357 D W 19150639 + 32 [kvm] > 8,16 0 158 2.415063867 32349 D W 19154743 + 16 [kvm] > > The content of that additional written sectors on the disk can either > be "zero" or something else. Please let me know if you have a clue or > tell me which file in the package should I be looking at closer to > understand this behavior. Most likely your guest partitions are not aligned to a 4k boundary; this causes the host to add padding to the nearest 4k, which is consistent with what you saw. You can use fdisk to confirm this. -- error compiling committee.c: too many arguments to function