Received: from eggs.gnu.org ([2001:4830:134:3::10]:40000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XguWk-00045R-Jh for qemu-devel@nongnu.org; Wed, 22 Oct 2014 07:56:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XguWc-0001VW-8X for qemu-devel@nongnu.org; Wed, 22 Oct 2014 07:56:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XguWc-0001VR-12 for qemu-devel@nongnu.org; Wed, 22 Oct 2014 07:56:22 -0400 Date: Wed, 22 Oct 2014 13:56:14 +0200 From: Kevin Wolf Message-ID: <20141022115614.GF3188@noname.str.redhat.com> References: <1413881486-24710-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1413881486-24710-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] block/vdi: Fix bmap writing error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi , =?iso-8859-1?Q?Beno=EEt?= Canet Am 21.10.2014 um 10:51 hat Max Reitz geschrieben: > The bmap size in block/vdi.c may exceed INT_MAX. Using > bdrv_pwrite_sync() (which takes an int byte count) is therefore not a > good idea. The second patch of this series fixes this by replacing > bdrv_pwrite_sync() by bdrv_write()+bdrv_flush() (we don't need the p in > pwrite here). > > The first patch employs ROUND_UP() and DIV_ROUND_UP() in block/vdi.c, so > you are reminded that bmap_size is aligned to BDRV_SECTOR_SIZE for the > second patch. > > See https://bugzilla.redhat.com/show_bug.cgi?id=1154940 for a bug > report. > > I will not include an iotest in this series because this would require > qemu to allocate and then write about 2G of data; yes, test 1 in 084 > fails for me because qemu cannot allocate 4G for the bmap. > > In fact, I can only test this once I'm home where I have more RAM > available (I made the mistake of activating swap space to test this only > once). Thanks, applied to the block branch. Kevin