From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2geR-0002bI-5z for qemu-devel@nongnu.org; Tue, 17 May 2016 11:11:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2geJ-00065P-ON for qemu-devel@nongnu.org; Tue, 17 May 2016 11:11:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2geJ-00065I-Dg for qemu-devel@nongnu.org; Tue, 17 May 2016 11:11:07 -0400 Date: Tue, 17 May 2016 17:11:05 +0200 From: Kevin Wolf Message-ID: <20160517151105.GD9802@noname.redhat.com> References: <1463476543-3087-1-git-send-email-den@openvz.org> <1463476543-3087-5-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463476543-3087-5-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 4/5] qcow2: fix condition in is_zero_cluster List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org Am 17.05.2016 um 11:15 hat Denis V. Lunev geschrieben: > We should check for (res & BDRV_BLOCK_ZERO) only. The situation when we > will have !(res & BDRV_BLOCK_DATA) and will not have BDRV_BLOCK_ZERO is > not possible. The patch is okay, but I'm correcting this paragraph into: We should check for (res & BDRV_BLOCK_ZERO) only. The situation when we will have !(res & BDRV_BLOCK_DATA) and will not have BDRV_BLOCK_ZERO is not possible for images with bdi.unallocated_blocks_are_zero == true. For those images where it's false, however, it can happen and we must not consider the data zeroed then or we would corrupt the image. Kevin