Received: from eggs.gnu.org ([2001:4830:134:3::10]:48484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2xF-0002cu-RI for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:44:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC2xB-00084N-R6 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:44:49 -0400 Received: from relay2.provo.novell.com ([137.65.250.214]:42557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2xB-000827-M9 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:44:45 -0400 Message-Id: <559ABE850200006600045FF0@relay2.provo.novell.com> Date: Mon, 06 Jul 2015 03:44:37 -0600 From: "Chun Yan Liu" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: [Qemu-devel] vpc size reporting problem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pl@kamp.de, mreitz@redhat.com While testing with a 1GB VHD file created on win7, found that the VHD file size reported on Windows is different from that is reported by qemu-img info or within a Linux KVM guest. Created a dynamic VHD file on win7, on Windows, it is reported 1024MB (2097152 sectors). But with qemu-img info or within a Linux KVM guest, it is reported 1023MB (2096640 sectors). The values in the footer_buf are as follows: creator_app: "win " cylinders: 0x820 (2080) heads: 0x10 (16) cyl/sec: 0x3f (63) current_size: 0x40000000 (1G) So, if using current_size, it's correct; but using CHS will get a smaller = size. Should we add a check in this case and use "current_size" instead of CHS? BTW, before commit 0444dceee, there is a similar check for 'd2v', if creator_app is 'd2v', using "size" instead of CHS. But in commit 0444dceee, this check is removed. To me, the new check and 'd2v' check seem to be two different cases, why removing 'd2v' check? Thanks, Chunyan