From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTqIP-0004Be-QD for qemu-devel@nongnu.org; Wed, 09 Oct 2013 05:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTqII-0001Q0-5d for qemu-devel@nongnu.org; Wed, 09 Oct 2013 05:43:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTqIH-0001Pm-Ts for qemu-devel@nongnu.org; Wed, 09 Oct 2013 05:43:02 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r999h1Wv022073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Oct 2013 05:43:01 -0400 Date: Wed, 9 Oct 2013 11:43:13 +0200 From: Kevin Wolf Message-ID: <20131009094313.GF8994@dhcp-200-207.str.redhat.com> References: <1381308176-22635-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1381308176-22635-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qcow2: Use pread for inactive L1 in overlap check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Am 09.10.2013 um 10:42 hat Max Reitz geschrieben: > Currently, qcow2_check_metadata_overlap uses bdrv_read to read inactive > L1 tables from disk. The number of sectors to read is calculated through > a truncating integer division, therefore, if the L1 table size is not a > multiple of the sector size, the final entries will not be read and > their entries in memory remain undefined (from the g_malloc). > Using bdrv_pread fixes this. > > Signed-off-by: Max Reitz Thanks, applied to the block branch. Kevin