Received: from eggs.gnu.org ([2001:4830:134:3::10]:47427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuMNx-0001OE-C1 for qemu-devel@nongnu.org; Mon, 18 May 2015 10:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuMNw-0000Tc-3c for qemu-devel@nongnu.org; Mon, 18 May 2015 10:51:17 -0400 Date: Mon, 18 May 2015 16:51:06 +0200 From: Kevin Wolf Message-ID: <20150518145106.GG5999@noname.str.redhat.com> References: <1431678966-16470-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431678966-16470-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 0/2] block: Fix error code for bdrv_getlength when the image is too big List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: berto@igalia.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, armbru@redhat.com Am 15.05.2015 um 10:36 hat Fam Zheng geschrieben: > v2: Correct detection of overflow. [Markus, Berto] > > If the image has a huge enough virtual size, > > $ qemu-img info afl9.img > qemu-img: Can't get size of device 'image': Unknown error -512 > > It's because of the multiplication overflow in the return statement in > bdrv_getlength (the big nagetive value is later truncated to 0x200). Fix it to > return -EFBIG: > > qemu-img: Can't get size of device 'image': File too large > > Bug reported by Richard Jones in: > > https://bugzilla.redhat.com/show_bug.cgi?id=1221499 Thanks, applied to the block branch. Kevin