Received: from eggs.gnu.org ([2001:4830:134:3::10]:48826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhDMv-00026W-Nv for qemu-devel@nongnu.org; Thu, 23 Oct 2014 04:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhDMq-00041O-Bl for qemu-devel@nongnu.org; Thu, 23 Oct 2014 04:03:37 -0400 From: Markus Armbruster References: <1413984320-28585-1-git-send-email-baloo@gandi.net> <5448A656.6030204@msgid.tls.msk.ru> Date: Thu, 23 Oct 2014 10:03:25 +0200 In-Reply-To: <5448A656.6030204@msgid.tls.msk.ru> (Michael Tokarev's message of "Thu, 23 Oct 2014 10:55:18 +0400") Message-ID: <87egtzusaa.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] vmdk: Fix cylinders number during convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Kevin Wolf , Fam Zheng , qemu-trivial@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Arthur Gautier Michael Tokarev writes: > On 10/22/2014 05:25 PM, Arthur Gautier wrote: >> We can not rely on int cast to get a correct number of cylinders. The >> cylinders information was wrong in 49.9999% of cases. >> >> This ensures the cylinders always gets the ceiling value. > > Good thing, especially the good probability :), and also a good patch > which comes with a test. > > But I wonder if anything can break this way? Migration, windows guest > being unable to find its partitions, something else? > > And more. What-if our drive size in cylinders will be larger than > the size in bytes? The proposed div_round_up() will increase number > of cylinders, so size in CHS will be larger than size in bytes. Maybe > there was a reason why originally the size in cylinders was calculated > by truncating extra fractional part? What-if guest will try to access > the very last CHS which is incomplete? Too many questions for -trivial, copying VMDK maintainers.