From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFgGy-0007h5-Tz for qemu-devel@nongnu.org; Fri, 08 Aug 2014 05:15:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFgGq-0002qW-3t for qemu-devel@nongnu.org; Fri, 08 Aug 2014 05:15:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFgGp-0002qH-R7 for qemu-devel@nongnu.org; Fri, 08 Aug 2014 05:15:31 -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 s789FU9t014468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 8 Aug 2014 05:15:31 -0400 Date: Fri, 8 Aug 2014 11:15:28 +0200 From: Kevin Wolf Message-ID: <20140808091527.GE4118@noname.redhat.com> References: <1407444475-19516-1-git-send-email-mreitz@redhat.com> <1407444475-19516-4-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1407444475-19516-4-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/3] block: Catch !bs->drv in bdrv_check() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Am 07.08.2014 um 22:47 hat Max Reitz geschrieben: > qemu-img check calls bdrv_check() twice if the first run repaired some > inconsistencies. If the first run however again triggered corruption > prevention (on qcow2) due to very bad inconsistencies, bs->drv may be > NULL afterwards. Thus, bdrv_check() should check whether bs->drv is set. > > Signed-off-by: Max Reitz I suppose there was a real case of this happening? I think bdrv_check() triggering corruption prevention is a rather bad sign. The most important point for image repair should be that it doesn't make the situation any worse. Smells like a follow-up patch to the qcow2 code. Kevin