From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUKZu-0006I9-7m for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:45:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUKZp-0006Gt-JY for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:45:05 -0500 Received: from [199.232.76.173] (port=59523 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUKZp-0006Gq-H9 for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:45:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33890) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUKZp-000270-0H for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:45:01 -0500 Message-ID: <4B4B2B1F.1090203@redhat.com> Date: Mon, 11 Jan 2010 14:43:59 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] dmg: fix ->open failure References: <20100111130654.GA24241@lst.de> In-Reply-To: <20100111130654.GA24241@lst.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org Am 11.01.2010 14:06, schrieb Christoph Hellwig: > > Currently the dmg image format driver simply opens the images as raw > if any kind of failure happens. This is contrarty to the behaviour > of all other image formats which just return an error and let the > block core deal with it. > > Signed-off-by: Christoph Hellwig Acked-by: Kevin Wolf I mean looking at the patched code I see lots of things that are wrong, but they are all unrelated to your change: There are error cases where memory is leaked, and it should use bdrv_* functions instead of the native open/read/etc. And obviously coding style is completely off (most annoying: tabs!) Kevin