From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smk1M-0008TE-TT for qemu-devel@nongnu.org; Thu, 05 Jul 2012 07:14:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Smk1E-0002SB-SG for qemu-devel@nongnu.org; Thu, 05 Jul 2012 07:14:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smk1E-0002Rq-KA for qemu-devel@nongnu.org; Thu, 05 Jul 2012 07:14:44 -0400 Message-ID: <4FF5771A.5040101@redhat.com> Date: Thu, 05 Jul 2012 13:14:34 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1340984094-5451-1-git-send-email-armbru@redhat.com> <1340984094-5451-4-git-send-email-armbru@redhat.com> <4FF45E87.8060100@redhat.com> <4FF5649E.4070606@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/32] vvfat: Fix partition table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Blue Swirl , pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 05.07.2012 13:10, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 05.07.2012 11:23, schrieb Markus Armbruster: >>> Kevin Wolf writes: >>> >>>> Am 29.06.2012 22:33, schrieb Blue Swirl: >>>>> On Fri, Jun 29, 2012 at 3:34 PM, Markus Armbruster wrote: >>>>>> + partition->length_sector_long = cpu_to_le32(s->bs->total_sectors >>>>>> + - s->first_sectors_number + 1); >>>> >>>> Just wondering... This should be the same as s->sector_count, right? >>> >>> Hmm. vvfat_open() assigns: >>> >>> s->sector_count = cyls * heads * secs - (s->first_sectors_number - 1); >>> bs->total_sectors = cyls * heads * secs; >>> >>> But it then changes it minds and does: >>> >>> s->sector_count = s->faked_sectors + s->sectors_per_cluster*s->cluster_count; >> >> Which probably means that they differ if some sub-cluster sized space is >> left unused at the end of the disk. It's not useful to have this space >> included in the partition, but it doesn't hurt either. So I suppose >> either way is fine. > > Complication: the partition should end on a cylinder boundary. Shaving > off an unused tail may well interfere with that. Let's stick to v1 > here. Good point. If anything, maybe add a comment. Kevin